Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-23-2006, 05:15 PM   #1
LQ Newbie
Registered: May 2006
Posts: 1

Rep: Reputation: 0
Deleted the mysql db files from /var/lib/mysql and reinstalling doesn't work!

Hello all,

I'm running Suse 10.0 and I rather daftly forgot my root password for mysql. Rather than doing the sensible thing and reading the manual I instead deleted the mysql database directory from /var/lib/mysql thinking it would be recreated if I reinstalled the package using YaST.

This does not appear the case. After fiddling about all evening I can't seem to get it to reappear from the package. Any suggestions on how to force YaST to do a clean install of mysql for me?


Old 05-24-2006, 10:16 AM   #2
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
I'm not that familiar with YaST, but if it works like other package managers, what it is doing is checking a database, finding that, as far as it knows, the "latest and greatest" version of the software is already installed, and therefore finding nothing to do.

What you will want to do is to use YaST to remove all the mysql packages. Once those are out of the database of installed packages, telling YaST to install it should work fine.

I recommend backing up the remaining mysql databases first--as simple as
cp -rap /var/lib/mysql /var/lib/mysql.BAK
(after shutting down mysql, of course).

After mysql is reinstalled, you will have to recreate the databases that you have backed up and grant proper privileges on them (as all this information is kept in the mysql database, which was whacked). Once that is done, shut down mysql, copy the datafiles' directories from /var/lib/mysql.BAK/* into /var/lib/mysql, and restart mysql. Hopefully everything will be happy then.

Good luck, and let us know how it turns out.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration