I locked my root user out from our database. I need to get all privileges back to the root user. I have my password and I can log in to MySQL. But the root user has no all privileges.
A:
if this is a windows box, the simplest thing to do is to stop the servers, add skip-grant-tables to the mysql configuration file, and restart the server.
once you've fixed your permission problems, repeat the above but remove the skip-grant-tables option.
if you don't know where your configuration file is, then log in to mysql send SHOW VARIABLES LIKE '%config%'
and one of the rows returned will tell you where your configuration file is.
longneck
2009-11-10 15:15:12
I don't know where the configuration file is.
Steven
2009-11-11 02:24:33
see my updated post. but honestly, if you're having this problem AND you don't know where your configuration file is, you should have someone more experienced fix it for you. unless this is just your personal database you're learning on, then go ahead and learn away. :)
longneck
2009-11-11 02:34:18
ErrorSQL query: EditGRANT ALL PRIVILEGES ON * . * TO 'root'@'localhost' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;MySQL said: Documentation#1290 - The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement You see, I have logged on to MySQL with the --skip-grant-tables option. But when I attempted to get all privileges back to the root user, I failed.
Steven
2009-11-11 02:54:32