How to Import a MYSQL Database using SSH / TELNET

Using SSH is a much more efficient way of importing a large MYSQL database than trying to use phpMyadmin. But if you’re not used to using SSH / Telnet, it can be a bit awkward.

Here are full and easy instructions on how to import a mysql database using SSH / TELNET.

  1. Use FTP to transfer your MySQL database to your server
  2. Create a remote connection using your SSH program to your server
  3. Navigate to the directory where you uploaded your MySQL database
  4. Enter this command: mysql -u username -p -h servername data-base-name < data.sql
  5. The system will prompt you for the database password
  6. Enter the password
  7. You’re done.