Default MySQL Databases.

Satori1

In Runtime
Messages
268
Fooling around with MySQL the other day, I managed to delete every database on the server. Not really a problem, considering I didn't really use it for much anyway. I've come to a point, now, where I need to use it.

Apparently, what I'm trying to do requires the default 'mysql' database that MySQL comes with. Since I deleted that, I'm wondering if there's anyway I can restore. Nothing special or anything, it just has to be the database MySQL ships with.

I've tried unemerging and emerging MySQL (I'm on Gentoo, by the way), but that hasn't helped. Any thing you guys could offer would be appreciated.
 
you need the MYSQL database that come standard with MySql because it contains a users table, without this table the database doesn't know if the user you specify has any privelages on the database, this prevents you from restoring it.

If you can install the database on another machine there is hope however...

tables are stored as flat files in /var/lib/mysql/mysql
(the last mysql is the database name)...
you could try copying them from another machine
 
I figured it out not to long after I posted this thread. MySQL includes a tool called 'mysql_install_db' that does exactly this. It reinstalls the default databases and tables'.

Pretty nifty.
 
Back
Top Bottom