Due to exporting SQL files
In your original website to use phpMyAdmin to export the database as a SQL file, this step everyone will, do not repeat.
Uploading SQL files
Said earlier, we did not install FTP on the cloud host, how to upload it?
Open the FTP client software, such as FileZilla, use the server IP and root and password, the connection must use the SFTP way to connect, so as to connect to Linux. Note that this method is unsafe, but we do not have FTP here, if you want to upload local files to the server, there is no better and faster way.
We uploaded the Database.sql to the/tmp directory.
Connect to Linux, login to MySQL
Connect to the cloud host using putty. Putty the use of the method here is not introduced.
After connection, login to MySQL
Copy Code code as follows:
>mysql-u root-p
>password:
Note that if you have previously established other MySQL users, you can select the appropriate user login. On the MySQL command line, you can learn from other places.
Import the uploaded SQL into the database
Follow the three steps below to quickly import this SQL file
Copy Code code as follows:
Mysql>use YourDatabaseName;
Mysql>set names UTF8;
mysql>source/tmp/database.sql;
Then the screen will continue to roll, and finally prompted the success of the import.
Finally, remember to delete the Database.sql.