Because the SQL file is exported
In your original website service provider to use phpMyAdmin Export database as SQL file, this step everybody, do not repeat.
Uploading SQL files
Previously said, we do not install FTP on the cloud host, how to upload it?
Open the FTP client software, such as FileZilla, using the server IP and root and password, be sure to connect using the SFTP connection, so as to connect to Linux. Note that this method is not secure, but we do not have FTP here, if you want to upload local files to the server, there is no better faster way.
We uploaded the Database.sql to the/tmp directory.
Connect to Linux and log in to MySQL
Connect to the cloud host using putty. How to use putty is not introduced here.
After connecting, log in to MySQL
Copy the Code code as follows:
>mysql-u root-p
>password:
Note that if you have previously established a different MySQL user, you can choose the appropriate user to log in. For MySQL command line, you can learn in other places.
Import the uploaded SQL into the database
Follow the three steps below to quickly import this SQL file
Copy the Code code as follows:
Mysql>use YourDatabaseName;
Mysql>set names UTF8;
mysql>source/tmp/database.sql;
Then the screen will continue to roll, the last prompt to import success.
Finally, remember to delete the Database.sql.
Method sharing for importing SQL files in Linux (using the command line to transfer MySQL database)