how to recreate mysql database
Hi, My linux version is Suse 8.0. Today, I tried to load a sql script into mysql database. But I forget to change to the right db. So the script is loaded into mysql database. Even worse is that the scirpt has table named 'user', so it drop and recreate this table. Now in mysql database, I mass up with the whole database. I can't login as admin or any account now.
I tried to rerun the /usr/bin/mysql_init_db, but after that, I didn't find that the root password is set to empty. I still can't login as any account. What I should do to recreate a mysql database as the same as it fresh installed? I don't have too much data in it. The question is that I don't want to reinstall the whole database. I just want to recreate the database.
Please help. Thanks
The lesson I learned: Don't load any sql script using root!