November 5th, 2000, 07:33 PM
I've accidentally deleted all users from my 'user' table in msyql and so I can't connect to re-add the root user.
Can anyone tell me how to do this? I'm running mysql 3.23.27-beta on win98.
November 6th, 2000, 07:23 AM
Have u also set up access rights on DBs/tables? - if not ...
Haven't tried this, but consider:
1. Stop mySQL
2. Copy (or ZIP) your mysqldata directory for backup and take a copy of my.ini (win dir)
3. rename the mysqldatamysql directory (to whatever)
4. Reinstall mySQL on top of the old one
A new mysqldatamysql directory should have been created and populated.
Hope this helps ....
November 6th, 2000, 07:27 AM
I didn't have any db's or tables in there so I just re-installed the entire mysql dist.
Thanks for the help.
November 8th, 2000, 02:59 AM
Actually, there is a backdoor, at least in the Linux version. I did something similar, I accidentally denied all users access from localhost, which meant that I had some problems with logging into mysql...
So I had to restart the mysql with some option thet prevented it from reading the grant tables. I don't remember the option but I found it in the manual, which can be very handy...