locked out of mysql database
I'm locked out of mysql database - it seems that all my users can't access it, through lack of privileges, even root. This means that I can't get through and change the privileges.
How can I start with a fresh users database? I'm only setting the database up at the moment, so there's no data to lose. I've tried mysqladmin_fix_privileges_tables and I've tried mysqladmin_install_db but nothing seems to work. Also, the actual mysql database itself has no tables. How can I restore that? Any ideas? |
Did you get hacked? Have you checked your logs? If there are no tables in the mysql db then you have no db. Please tell me you have a backup somewhere? Otherwise you have to start fresh.
|
Thanks for the tips. I wasn't hacked - this is an internal server at work, and I was starting up mysql and foolishly (somehow, definately not intentionally) changed the permissions using phpmyadmin - however, I've managed to fix it now -the documentation is brilliant, although it tool a while to fix.
I found the files that needed deleting, deleted them and ran mysql_install_db (you should do this as user mysql) -all the necessary databases are set up again, with a user root. Gave root a password and it worked a treat. |
Glad to hear...
As a side note, I find that you can't really loose data...it just takes a while to put it back the way you had it... :-) |
All times are GMT -5. The time now is 05:31 AM. |