MySQL Forums
Forum List  »  Install & Repo

Re: Broken MySQL, Re-install doesn't seem to help
Posted by: Andrew Simkovsky
Date: September 05, 2013 04:55PM

Do you have command line access to the database? Can you connect to root at all?

mysql -u root -p password

What about without password?

mysql -u root

If neither of those works, you could try the one user you are logging in to phpmyadmin with.

Once logged in, you would then run insert statements into the mysql.user table to recreate the root user. Of course, that will only work if the user logged in with actually had the privileges to do so.

Worst case scenario, restart mysql with skip_grant_tables in the my.cnf file. That will ignore all grants for user. Then login with root without the password:

mysql -u root

Run the insert command into mysql.user to recreate root for localhost and 127.0.0.1. Then take skip_grant_tables out of my.cnf and restart mysql. You should then be able to login in locally as root.

Once you get to that point you can recreate any users you need by using the normal GRANT command.

Andrew Simkovsky
More mysql forums (and other databases):
http://www.dbtekpro.com/forums
Brand new! Just post!

Options: ReplyQuote


Subject
Written By
Posted
Re: Broken MySQL, Re-install doesn't seem to help
September 05, 2013 04:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.