When dealing with large databases over 50Mb it is recommended to manage them via SSH. SiteGround customers can find more information on how to connect to and use SSH in our SSH Tutorial.
In this article, we will cover exporting and importing a database via SSH. Make sure that you replace the following variables in the commands below:
USERNAME - the MySQL user assigned to your database.
DATABASE - the name of your MySQL database.
- Exporting a MySQL database
To export a MySQL database, you need to use the mysqldump command. Here is the full command for exporting your database:
mysqldump -uUSERNAME -p DATABASE > backup.sql
You will be prompted for a password - this is your MySQL user's password.