Create backup.sql using mysqldump
1) Create a directory called 'mysql_backups' using cPanel and File Manager. This will be located in the following folder:
2) Log into your web site terminal. This is very easy to do on a macOS because all you have to do is go to the Terminal and enter the following:
The number is the IP address of your server.
3) Now enter the following command to create a backup.sql file, this will be the backup of your database:
Note: if your database collation is uft8mb4 you will need to use this command:
1) Create a directory called 'mysql_backups' using cPanel and File Manager. This will be located in the following folder:
/home/path/mysql_backups
2) Log into your web site terminal. This is very easy to do on a macOS because all you have to do is go to the Terminal and enter the following:
ssh 123.123.123.123 -l root
The number is the IP address of your server.
3) Now enter the following command to create a backup.sql file, this will be the backup of your database:
mysqldump --opt --no-tablespaces -uroot database_name > /home/path/mysql_backups/backup.sql
Note: if your database collation is uft8mb4 you will need to use this command:
mysqldump --opt --no-tablespaces --default-character-set=utf8mb4 -uroot database_name > /home/path/mysql_backups/backup.sql