Migrate Database - SQL Commands

Instructions to migrate a database using SQL commands.

  • Download: Download the database dump.
    mysqldump -u admin -p DBNAME > mysqlfile.sql
  • Transfer File from SSH to Current Location: Transfer the database dump from SSH to the current location.
    scp root@IP_ADDRESS:/root/DBNAME.sql .
  • Import: Import the database dump into a new database.
    mysql -u root -p DATABASENAME < data-dump.sql