Migrating databases (MySQL/MariaDB).
Three ways to move a database — phpMyAdmin export, mysqldump via SSH, and direct DB-to-DB transfer. Plus how to handle big databases.
Most CMS migrations are 90% files + 10% database. The database is what stores your content, users, settings — losing it means losing everything. Here's how to move it cleanly.
Method 1: phpMyAdmin export/import (easiest)
Best for databases under 100 MB.
On the old host
- Your old host's control panel → phpMyAdmin
- Click your database in the left sidebar
- Export tab → leave defaults → Go
- Download the
.sqlfile
On Rivervo
- Project → Website → Databases → create a database (note the name) and a user, and give the user all privileges on the database
- Databases → phpMyAdmin → click the new database → Import tab → upload the
.sqlfile → Go
Done. Update your app's config to point at the new DB credentials.
Method 2: mysqldump via SSH (best for medium-large DBs)
Bigger DBs hit phpMyAdmin's upload limit. The SSH method has no such limit — and it needs SSH access. On Rivervo hosting SSH is ready: Website → SSH and SFTP has the connection details, and Website → Terminal gives you a shell in the browser.
On old host (if SSH access)
mysqldump -u olduser -p --single-transaction --quick --lock-tables=false oldwp > backup.sql--single-transaction keeps the site working during dump (no locking).
Transfer to new host
Either via scp:
scp backup.sql newuser@newhost.com:/home/newuser/Or upload it in Website → Files if you can't SSH between hosts.
On Rivervo (SSH)
mysql -u newuser -p newwp < backup.sqlFor big files, watch progress with pv:
pv backup.sql | mysql -u newuser -p newwpMethod 3: direct host-to-host (fastest for huge DBs)
If both hosts have SSH and outbound network access:
# From new host:
ssh olduser@oldhost.com 'mysqldump --single-transaction olddb' | mysql -u newuser -p newdbStreams directly from old → new without intermediate file. Limited only by network speed.
For 50+ GB databases, consider compression in transit:
ssh olduser@oldhost.com 'mysqldump --single-transaction olddb | gzip' | gunzip | mysql -u newuser -p newdbConnection settings — what to update
After import, your app's config file needs the new credentials.
WordPress (wp-config.php):
define('DB_NAME', 'newuser_newwp');
define('DB_USER', 'newuser_dbuser');
define('DB_PASSWORD', 'newpass');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8mb4');
define('DB_COLLATE', '');
$table_prefix = 'wp_'; // must match the prefix from old DBLaravel (.env):
DB_HOST=localhost
DB_DATABASE=newuser_newwp
DB_USERNAME=newuser_dbuser
DB_PASSWORD=newpassThe exact field names vary by app, but the pattern is the same.
Verifying the import
USE newdb;
SHOW TABLES;
SELECT COUNT(*) FROM wp_posts; # or whatever big table you haveCompare counts to the old DB. If they match, import succeeded.
Common errors
"Access denied for user". New user doesn't have permissions on the new DB. Give the user all privileges on the database again in Website → Databases.
"Got error 28 from storage engine". Disk full on import. Free space on the host or upgrade plan.
"Unknown collation: 'utf8mb4_0900_ai_ci'". The old DB used a MySQL 8 collation that the new database server doesn't support. Run search-replace on the SQL file:
sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' backup.sqlThen re-import.
"Table 'wp_X' doesn't exist". Foreign keys imported in wrong order. mysqldump should handle this with --add-drop-table (default). Re-export with that option set.
What to update after move
- DB credentials in app config (above)
- Site URL if changed (search-replace
https://oldhost.com→https://newhost.comin DB) - Permalinks (WordPress: Settings → Permalinks → Save, no changes — regenerates rules)
- Search index (rebuild if you used external search like Elasticsearch)