How do you move a MySQL Database from your previous host to giganetwebhosting.com
1. Solution using PHPMyAdmin
The following are the steps to Export and then Import a MySQL database using phpMyAdmin
Export from phpMyAdmin
- Open your phpMyAdmin at the previous host
- On the welcome screen you will see an Export option click on this link
- This will bring up the view dump (schema) of databases screen
- Select the tables you wish to be exported from the list
- Ensure you choose SQL as the option (this will allow you to just paste the SQL for your next host)
- It will create text file on the screen, highlight the information and paste it into a text document.
Save this for when you get hosting.
Import into phpMyAdmin
- Open cPanel at giganetwebhosting.com server with your usr and password and open your phpMyAdmin
- On the welcome screen you will see an Query window option (lower left corner) click on this link
- Paste the contents of the text file that you exported and done. Your database and it's contents are moved
It is good to save the the data to a file, and then to transfer the file directly by using the file input form just below the query form.
Keep hold of the file so that you have a backup to refer to should something go wrong with the import.
2. Solution using mysqldump and shell access (Telnet, SSH)
It may be possible for you to move your database to Giganetwebhosting with one command passed through shell. This solution requires Shell (Telnet or SSH) access to one of the hosts, AND remote access to the "other" database. The command looks like this:
mysqldump -h oldhost -u oldusername -poldpassword olddbname | mysql -h newhost -u newusername -pnewpassword newdbname
Note: there is no space between "-p" and the password.
The "mysqldump" command writes a copy of a database to a single file; this is known as "dumping." With these parameters, the database is written straight to your new server's database. The -h flag specifies the hostname, -u the username associated with the SQL database (NOT your domain management username for your host), -p is the SQL user's password, and finally there's the database name. Once the file is transferred, MySQL will populate the destination database with the data from the dumped file. Note that the destination database must already exist -- if it does not, this command will fail.
If you are running this command from shell on your old host, you must grant remote access to your Giganetwebhosting database from your Cpanel --> Databases --> Remote Mysql. Add the IP address of your old server to Access Hosts.
Of course if you have problems migrating your database yourself you could ALWAYS ask our tech dpt. to do the migration for you.