PDA

View Full Version : Restoring database not using MySQL dump


M. Libbert
Tue 28th May '02, 6:42am
(Note this isn’t my vB site, but my indexu site)

To make a long story short, one of the hosts I use went out of business without notice and simply shut off my account. He claimed he didn’t have any backups, but after a couple of hours of arm-twisting I was able to successfully get a week old backup out of him. Now what I got from him was a backup of my entire hosting account made with the CP software. I unzipped it, and under the mysql folder is two separate folders with the name of each database I created in that hosting account. Each folder is full of files with the extensions of .MYI .MYD and so on. How do I restore this to a functioning database?

eva2000
Tue 28th May '02, 6:56am
what they just closed up like that!

those files are your actual mysql data files

to get them onto your new host you host would have to shutdown mysql first and copy them over to their mysql data directory under a new directory/databasename then restart mysql


unfortunately i doubt any web host will shut down mysql to just move your forum data into place since they'd have other web sites on the servers using mysql

best bet is to install apache/php/mysql locally on your windows server..

move those files into your window's mysql data directory and run a backup of them into a .sql file and then get your web host to import the sql file into a new mysql database

refertech
Sun 2nd Jun '02, 7:18pm
Oh, I need to get in on this one again. :)
What is the command line at the mysql prompt on your local machine to import that sql file into a empty database. I've been beating my head against the wall for 2 hours now.

:)

Thanks

Steve Machol
Sun 2nd Jun '02, 8:00pm
From http://www.vbulletin.com/manual/movingservers.html:

- at the prompt type:
mysql -uUSERNAME -p newdbname < /path/to/dump.sql

Note that this is the shell prompt, not the mysql prompt.

refertech
Sun 2nd Jun '02, 8:26pm
When you say shell, on a Windows machine that would be the cmd prompt in the mysql/bin directory?

Never mind it got it. :) Thanks

Steve Machol
Sun 2nd Jun '02, 8:30pm
Yes.