Migrating your MySQL database is a critical step in moving any dynamic website. This guide covers exporting from your old host and importing on Double Hosting.
Step 1: Export from Old Host
On your old host, open phpMyAdmin. Select your database from the left panel. Click the Export tab. Choose Quick export method and SQL format. Click Go. Save the .sql file to your computer.
Step 2: Create a Database on Double Hosting
In Double Hosting cPanel, go to MySQL Databases. Create a new database, a new user (with a strong password), and assign the user to the database with All Privileges. Note the exact database name and username (with cPanel prefix).
Step 3: Import the Database
Open phpMyAdmin on Double Hosting. Select the new (empty) database. Click the Import tab. Click Choose File, select your .sql file, and click Go. Large databases may take several minutes.
mysql -u username -p database_name < backup.sqlStep 4: Update Application Config
Update your application's database configuration file (e.g., wp-config.php for WordPress) with the new database name, username, password, and host (localhost).