PDA

View Full Version : importing a backup .sql file


Lee Wisener
Sat 25th Oct '03, 12:47pm
I am trying without much success to import a backup of my database.

The site is running fine but I set up apache, mysql and php on my home system so that I could now run a test version of my vb site and put in mods etc so I can test before putting it live.

To get some data i downloaded my file (vbulletin.sql) and tried to import it (5.8MB), phpmyadmin choked on it.

I changed the max upload and timeout sessions in my php.ini that would not work.

I tried using the command line.

So far if i run the following from the mysql prompt on my home pc

source C:/sitebackup/vbulletin.sql

it sees the file but says I have not selected the database to import to, i have tried adding < vbulletin to the end of the statement above and others but it wont work, and try as I may I cant find a straight forward solution to this, I know there must be one.

Can someone please tell me what command I would use to import this and more importantly would the command be the same if I had to recover from a disaster on my server.

thanks

Steve Machol
Sat 25th Oct '03, 1:18pm
mysql -uUSERNME -p DBNAME < vbulletin.sql

You'll then be prmted for your db user's password.

MrNase
Sat 25th Oct '03, 5:03pm
via http: http://www.ozerov.de/bigdump.php