There are a few simple steps you should follow to move one or more of your MySQL databases from an existing Web hosting company over to pair Networks.

1. Create an Empty Database at pair Networks

You will need to create an empty database on your pair Networks Web hosting account before you can import your MySQL Database. Here are the simple steps to create a database on your pair Networks Web hosting account:

  1. Log into the Account Control Center (https://my.pair.com/)
  2. Select Database
  3. Select Create New Database
  4. Enter a database name into the Database Name field
  5. Select the access level using the Access Level drop-down menur
  6. Select the optimization period using the Optimization Period drop-down menu
  7. Click Add Database

Take note of the information on the database creation success page. It is recommended that you save the page for future reference.

2. Create a MySQL “Dump File” of Your Database

To move your database from your old Web hosting company to pair Networks, you will have to create what is called a “dump file” of your database, which is basically a copy of your database. Check with your old host on how this would work with their system. Generally, if you run the following command in a terminal window, you will have created a “dump file.”

mysqldump -Qq -hDBSERVER -uUSERNAME -p DATABASE_NAME > backup.sql

Replace “DBSERVER” with the server name where the database currently resides. Replace “USERNAME” with your MySQL username, and replace “DATABASE_NAME” with the full name of the database. With most other Web hosting companies, you can leave off the “-hDBSERVER” part, which will make the command default to what is known as the “local host.” Many other Web hosting companies have databases running on the same server as the Web hosting files.

Please also note that when you run this command, you will be promoted for a password. Enter your MySQL database password at this point. Depending on the size of the database, the command may take up to several minutes to run.

The command above will create a file named backup.sql in the current directory where the command was run. Run this command on your old Web hosting or database server. You will then need to upload this backup.sql file to your pair Networks Web hosting account (in your home directory).

3. Upload the Dump File to Your New Web Hosting Account

Use FTP or SFTP to upload the backup.sql file to your pair Networks Web hosting server. After uploading the file, connect to the hosting server using SSH. After you are connected, you can transfer the contents of the backup.sql file into your new empty pair Networks database by entering the following command in a terminal window:

mysql -hDBSERVER -uUSERNAME -p DATABASE_NAME < backup.sql

Replace “DBSERVER” with your pair Networks database server name. Replace “USERNAME” with your pair Networks MySQL username, and replace “DATABASE_NAME” with your new pair Networks database name. Refer back to the pair Networks database information page for this information.

Please also note that when you run this command, you will be promoted for a password. Enter your MySQL database password at this point. Depending on the size of the database, the command may take up to several minutes to run.