Results 1 to 6 of 6
mysql processes continually sleep causing server crash Forum: PHP ForumReplies: 2
How to connect to database mysql Forum: DatabasesReplies: 1
Connecting to Mysql Database Forum: DatabasesReplies: 3
Clearing out MYSQL database? Forum: PHP ForumReplies: 3
02-07-2005, 11:09 AM #1
Restoring MySQL Database After Crash
I'm just getting started with PHP and MySQL. I had a problem with my MySQL server, and I had to reinstall it. I wasn't able to do a dump of the data before the server crashed, but I did copy the "data" folder and the folder containing the Inno DB files from my hardrive. I have now reinstalled MySQL, but when I try to replace those folders, I am no longer able to log into the server, even as the root user. I did not reinstall the former "mysql" folder with the old user tables, and I also used the same passwords as I did on the former MySQL install so I don't think that is the problem.
How do I restore the databases from the old server? Is there a utility I can use to restore the databases and tables from the files in the data and InnoDB folders I copied?
I am running MySQL Server 4.1 on a Windows 2000 Machine. I only had 2 databases on my old server, and they were fairly small in size.
Thanks for any info,
The Sunburned Surveyor
02-07-2005, 03:32 PM #2
Hiya, welcome to the forums.
As you didn't reinstall the users priviliges tables, have you tried the default mysql login (root with a blank password)?
02-08-2005, 10:48 AM #3
Thank you for the welcome.
After a re-install of MySQL I can log in with the root user, and with any other user accounts that I create.
However, I thought I could restore my 2 databases by simply replacing the "data" folder and InnoDB folder from my re-install with the same folders from my MySQL install before the crash.
Once I replace the folders I can no longer log into MySQL, even as the root user.
My Question really should be "How do I restore my databases to a new install of MySQL if all I have is a copy of the "data" folder and the InnoDB folder from the old MySQL intallation?"
I thought I could just replace the folders, but I think there may be something more involved.
Thanks for your help.
The Sunburned SUrveyor
02-08-2005, 11:00 AM #4
You must have the tables in order to upload the data correctly.
Why this is messing with your login I cannot say for sure.
02-08-2005, 11:00 AM #5
I'm not sure if this is going to work, but try
Replace the data but without the mysql directory thats inside it
Try default logon
You will probably have to set up priviliges again.
For future reference, mysqldump is the preferred way of backing up your databases. Also phpMyAdmin has a very good export.
08-14-2009, 01:59 AM #6
Re: Restoring MySQL Database After Crash
I hope after fresh installation of php and mysql you first stop mysql via services and replace datafilder contain all your previous database and tables then start mysql and try to login if you have root password first remove that