Follow the steps below on how to import your MySQL database to phpMyAdmin via SSH. This method is applicable if you can upload the .SQL file to your hosting account. Â
Note: SSH connections are only allowed in Vodien Virtual Private Server and Dedicated Server plans. |
Step 1. Upload your .SQL file via FTP or upload it via File Manager and take note of its file path as you will use this in Step 3 and Step 4. Â
Tip: The directory or file path is located on the upper right side of File Manager page and on the remote side panel of the FTP. See images below for reference. |
Step 2. Connect to SSH via Windows or connect to SSH via Mac. Â
Step 3. Enter the code below to access the directory where your .SQL file is located. Replace directory with the file path obtained from Step 1. Then, click the Enter key of your computer. Â
cd directory/
Step 4. Enter the command below to import the database. Replace databaseusername, databasename, and directory/filetoimport.sql with the database username, database name, and the file path respectively. If the database does not exist yet, create a new MySQL Database.Â
mysql -h localhost -u databaseusername -p databasename < directory/filetoimport.sql
Step 5. Enter the database password on the command line. Whatever you type in here does not appear, but it captures anything you paste or enter. Â
Once successful, you can check your phpMyAdmin to confirm. Â
Feel free to contact our Singapore or Australia Support Team if you have further questions.Â