4) Restoring the Database on the New Server 
1On the new server, if necessary, create the database which your vBulletin will be installed in. Refer to your host for specific information on how this is done.
2Telnet/SSH into machine2.
3Type:
mysql -uUSERNAME -p NEWDBNAME < /PATH/TO/NEW/DUMP.SQL
You should change the following parts of this line:
  • USERNAME - this is the new username which you will use to access MySQL. If you do not know this value, you should contact your host.
  • NEWDBNAME - the name of the new database that you created in the first part of this step.
  • /PATH/TO/NEW/DUMP.SQL - this is the path to the backup file that you transferred to this server in step 2.
Note:
We recommend you use the method described above to restore your database, as it is the most reliable. If you don't have access to SSH then there are alternate instructions on restoring your database available in the technical section of the manual.
User Contributed Notes: 4) Restoring the Database on the New Server Add a Comment
David Fiedler 20th Apr 2005, 11:06am
I think in http://www.vbulletin.com/docs/html/main/moving_servers_restore you meant:

-D newdatabasename

rather than

-P newdatabasename
jeff 31st May 2005, 07:54pm
no, the -D command is NOT needed.
the -p command is needed, as it is to prompt a password.

Also, when entering the location of a file, the first / may not belong. That is to say, if the error that a file can not be found is given, try:

< path/to/dump.sql

instead of

< /path/to/dump.sql
Bill 23rd Nov 2005, 12:14pm
On a Windows 2003 IIS6 server I received errors using the above. I was successful with the following:

Change directory to where the dump.sql file is located

If your current directory is not the same as the location of the dump.sql file, use a cd command to change location.

Connect to the MySQL server using the mysql program

At your command-line prompt, issue this command:

shell> mysql -u root -p

Create the vB database and select it as the default database:

In the mysql program, issue the following statements:

mysql> CREATE DATABASE vb_database;
mysql> USE vb_database;

Load the contents of dump.sql into the vb_database

Issue a SOURCE command to tell mysql to read and process the contents of dump.sql:

mysql> SOURCE dump.sql;

You'll see quite a bit of output as mysql reads queries from the dump.sql file and executes them.
Add a Comment