Bug #11507 No databases exist, mysql hangs when I run "show databases;"
Submitted: 22 Jun 2005 15:05 Modified: 22 Jun 2005 17:33
Reporter: Trev Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0 - 5.0.7 OS:MacOS (MacOS 10.4)
Assigned to: CPU Architecture:Any

[22 Jun 2005 15:05] Trev
Description:
I believe at first I was running MySQL 4.1 just fine, then I installed 5.0.7.
The first thing I noticed was that the test installation of phpBB would not install ("Could not connect to database"), and after looking into it for quite some time I concluded that phpBB would only support mysql server 3.x - 4.x, for some reason.
So, I deleted the directory that had 5.0.7 and installed 4.1 again to get things back to normal.
However, when I ran the MySQL monitor, etc, it ran as 5.0.7, so I also had to delete that installation. It was sometime around then that I realized that the database "mysql" was missing. 
I tried to restore from a backup I had made, but that didnt work, it began returning errors with every query (I couldnt tell because I pasted the entire contents of the .sql file)
Also, when I tried to create a database, it returned error number 2, and I figured there must have been something wrong with the installation.
So, I deleted that installation as well, and installed 4.0.. this was when mysql started to hang when I tried to execute "show databases;". I assume this is because there isnt a database to show

How to repeat:
You could probably try deleting the mysql installation using sudo rm -rfd /usr/local/mysql-blah

Suggested fix:
I think the best way to fix this problem would be a complete deletion of any mysql installed files on my system, so I would be able to start from scratch, as if I had never ran MySQL on my computer.
This should be accomplished with an uninstaller, which i havent found yet
[22 Jun 2005 17:27] Trev
I solved this problem, I had to install it one more time.. however, now I'm locked out of mysql because there dont seem to be any users.
Is there any way to reset the user tables?