By Hally | Last Updated
For the file size limitation, we cannot upload a big file larger than 20M to wordpress server, so we cannot import wordpress file with wordpress import tool, and cannot use phpMyAdmin to import mysql database. In this article, I will shows you how to move your sql database to another wordpress without that limitation.
The following steps tell you how to move sql database files from A wordpress server to B wordpress server.
1. Eanble ssh access on A server and B server.
2. Use ssh login A server, and create a new directory named SQL_BACKUP, and cd to this folder.
3. Use sql command to export sql data from sql database: mysqldump -h localhost -p -u db_user1 wp_db1 pumub_blog_2014.sql. -h is followed by host name or ip address. -u is followed by user name of the database and the database name. You will be asked to input the password when this command is executed.
4. Use ssh login B server and create a name directory named SQL_DB.
5.Download and upload the pumub_blog_2014.sql to the SQL_DB directory of B server.
6. Use MySQL Databases or other sql database tool to create a sql database named pumub_blog_db, and create a user named pb_db_user with password pw_123456 for it.
7. Use sql command to import pumub_blog_2014.sql to pumub_blog_db database: mysql -p -u pb_db_user pumub_blog_db pumub_blog_2014.sql. You will be asked to input the password when this command is executed.
Tips: You can login B server and export the database file from A server to B server directly to simplify the steps. If you want to remote access SQL database, you need to add the ip address of A server to the Remote Access list.
Related Articles: