Results 1 to 4 of 4
Thread: mysql root got deleted...help
Mar 8, 2003, 00:07 #1
mysql root got deleted...help
It figures, but somebody deleted the root mysql user. I tried the usual methods of mysql_install_db and mysql_fix_privilege_tables (thoug the later is only REQUIRED if you are doing an upgrade) and we still can't get in. What do we do now? How do we completely reinitialise mysql? Thanks.
Mar 8, 2003, 16:59 #2
Ok I tried completely deinstalling the packages and reinstalling them. When I use:
shell> mysql -u root mysql
shell> mysql -u root mysql -p
I now get the usual "access denied for root@localhost" errors.
What do I do now? Did I miss a step? Are there some files I need to rm after deinstalling the rpm's?
Mar 9, 2003, 03:25 #3
- Join Date
- Jul 2001
- 0 Post(s)
- 0 Thread(s)
try starting mysqld with --skip-grant-tables (or just skip-grant-tables in the [mysqld] section of my.cnf). this will allow anyone to connect to the server and do anything. so be careful! then hopefully you can use the GRANT command, phpMyAdmin, whatever to get the root user back.
then don't forget to remove the skip-grant-tables option and restart MySQL.
i hope that'll help.- Matt ** Ignore old signature for now... **
Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
"Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR
Mar 9, 2003, 09:27 #4
You know what, I actually tried something similar to that last night. It still didn't work. I did some poking aroun after deinstalling all the packes again and found that simply deinstalling the packages isn't enough. There are still a bunch of files resident. When I reinstalled the packages, the old db files were never overwritten. I got it fixed by completely removing mysql, including the rouge files and then reinstalling the packages. Thanks!