There are a number of ways to upload your MySQL database to your account.
Using phpMyAdmin
You can use phpMyAdmin to upload your database by using ‘Import’ to upload a .sql file, or by pasting the SQL script into a query window and executing it.
To get into phpMyAdmin:
- Log into your eXtend Control Panel
- Click on ‘MySQL Databases’
- Click ‘Manage’ on one of your databases
- You are now in phpMyAdmin
To use ‘Import’:
- Click ‘Import’
- Select the file you wish to upload
- Select the options you need for this database
- Click ‘Go’
- The database will be imported
Please note: ‘Import’ can only be used on databases that are smaller than 16MB.
To paste your SQL script in:
- Select the database you wish to import into
- Click the SQL tab
- Paste your SQL script into the text area
- Click ‘Go’
- Your database, through the SQL script, will be imported
If your SQL script contains a large amount of data, you may be able to paste it in sections to get all the content in.
Using eXtend Control Panel Database Restore
You can restore existing backups through the eXtend Control Panel MySQL Database page.
To restore a backup:
- Log into your eXtend Control Panel
- Click on ‘MySQL Databases’
- Click ‘Restore Backup’
- Select the database you wish to restore from the drop-down
- Select the SQL file you wish to upload
- Click ‘Restore’
- The database will be imported
Using MySQL Workbench
MySQL offers the MySQL Workbench, a piece of free software that allows you to manage, backup, and restore MySQL databases. The software can restore large databases, and also comes packaged with the MySQL Query Browser.
To download and find out more about MySQL Workbench, please visit the MySQL site: http://dev.mysql.com/downloads/workbench/
Using MySQL Command Line Client in SSH
If you have SSH access to your account, you can upload your MySQL backup to your home directory, and then execute the MySQL client to load a MySQL dump file.
To get the MySQL dump file:
- Log into your account using SSH
- Enter in this line:
Mysqldump --opt -Q dbname
Where the dbname is your database’s name
- Upload the SQL dump file into your home directory
To load your MySQL dump using MySQL:
- Enter this line:
mysql -h mysqlhost -u mysqlusername -p databasename < dumpfile.sql
or
cat dumpfile | mysql -h mysqlhost -u mysqlusername -p databasename
Where mysqlhost is the name of the server, mysqlusername is your MySQL user name, datbasename is your database’s name, and dumpfile.sql is the file created by mysqldump.