mysql databases disappeared
help
!!!!!! I had a system hickup yesterday -- something happened and i'm not sure what - all I know is I can't find my mysql database -- it's not listed in phpmyadmin - need to recover database cookbooks asap - how can I find it? I ran all this as I was getting a mysql crash - not starting, stopping from pid error --- running pcbsd,mysql Code:
root@pcbsd# /usr/local/bin/mysqld_safe --user=root & |
You shouldn't have run mysql_install_db, because the mysql database was overwitten by a new one with only the default user (root) and privileges. Whatl you have to do now is to reconfigure phpmyadmin with the new root/password.
Hopefully your other databases should be there. You can read this to see how you can recover mysql from crash and consider keeping frequent backups of your databases. Regards |
Quote:
|
Quote:
|
I did a mysql show databases from terminal and the database in question is not showing
how screwed am I? I've got a backup from 2 or three weeks ago |
there is a file called cookbooks which is the database sitting in /usr/local/www/apache22/data/phpmyadmin -- this may be the info =--- how do I get it to reload?
it contains the following admin:$2a$04$b3YRT/..G.....O.../5iuOGhVrc3Ns5hwigGuZzwiM9nqYSNCTsu |
Quote:
Quote:
What you can try is to stop mysqld, and from the backup you have copy the mysql database in the directory where the databases are stored (I guess it's /usr/local/mysql/data) overwriting the new one. Make a backup first or better you can move it to somewhere else: Code:
mv /usr/local/mysql/data/mysql /usr/local/mysql/data/mysql.old Start mysqld and see if it works Quote:
|
Quote:
old dbase is located in -- just found it -- it looks correct -- now, how do I get that back into mysql's system? |
all the myd and myi files are there -- now, how do I go about reloading the database with this info
|
Quote:
If that's correct, then as I told you, you have to: 1. Stop the mysqld daemon 2. Rename the /usr/local/mysqldata/mysql to something else. 3. Copy from the backup only the mysql directory in the above location. 4. Restart mysqld |
the my.cnf got hosed as part of reconstructing my original problem from yesterday, now, I'm back to getting this error:
STOPPING server from pid file /var/run/mysqld/mysqld.pid 090312 09:43:25 mysqld ended the data seems in tact |
ok -- i got it fixed, thanks for your help -- daily backups from now on
|
All times are GMT -5. The time now is 08:49 PM. |