In this tutorial i’ll show you how to use the Putty SSH client to import large MySql Databases from your public_html root directory to a New database in PhpMyAdmin.
Moving your WordPress files and databases to a new server is fairly straight forward if you have a small site. But you’ll most likely need to use an SSH client if your database .sql file is larger than 20-30 mg.
Some web hosts won’t allow you to import large databases and advise you to use a free SSH client like, Putty. Putty allows you to enter a command which import your database in PhpMyAdmin.
Recently i was offered a one month trial account with GreenGeeks hosting and found this was the case. Since my MySql database is over 30mg in size, even after using a database optimization plugin to reduce the size, the only solution was to:
- Download Putty
- Upload your My Sql database file to my sites public_html root directory
- Create a new database using the MySql database wizard in cPanel
- Enter a command line in Putty which imports the database to PhpMyAdmin
Here’s what Putty looks like once installed on your desktop:
Putty is available for download for both Mac and Windows users who need to use SSH rather than FTP to transfer large databases to a new server.
Next step is to enter your Hostname or I.P address and use port 22. If you are entering your hostname, leave out the http://www and simply enter yourdomain.com.
- You can then enter your cPanel username and click enter
- Then enter your password and click enter.
- The final step is to enter the command line below
mysql -u database_user -p database_db < /home/wpsitesn/public_html/wpsites_wpsit.sql
and click enter. (make sure to replace the path in blue & red with the correct address to your database. The filename for your SQL database file is in red. You’ll also need to replace the part in green with your new database username and password.
Make sure you have upload your database to the root directory of your site as this is where it will be uploaded from to phpmyadmin.
If all else fails, you can upload the database to your site public_html root directory and email GreenGeeks technical support to complete the import for you.
Another option is to take advantage of Hostgator’s free website transfer which they offer with all hosting plans. I have used this service myself as it has saved heaps of time on large sites.Subscribe for new Genesis Tutorials