Exporting the Database
Via phpMyAdmin
- Log in to phpMyAdmin on your old hosting
- Select the database you need
- Go to the Export tab
- Choose SQL format and click Go
- Save the .sql file to your computer
Via SSH (mysqldump)
mysqldump -u username -p database_name > export.sqlImporting on the New Server
Via phpMyAdmin
- Create a new database in cPanel
- Open phpMyAdmin, select the new DB
- Go to the Import tab and upload the .sql file
Via SSH
mysql -u username -p database_name < export.sql