How to generate a MySQL backup using mysqldump
How to generate a MySQL backup using mysqldump
1. Access the server via SSH
ssh user@your_server
2. Run the command to generate the backup
mysqldump -u user -p database_name > backup.sql
- user → MySQL username
- database_name → the database you want to export
- backup.sql → the name of the file that will be generated
- After running the command, the terminal will ask for the MySQL password.
Type it and press Enter. -
Important: nothing will appear while typing the password — this is normal.
3. Wait for the process to finish
The command will generate the backup.sql file in the same directory where it was executed.
4. Download the file to your local machine (optional)
If you want to copy the backup to your local machine, use:
scp user@your_server:/path/backup.sql .
- Replace /path/backup.sql with the correct path where the file was saved.
- The final dot (.) indicates that the file will be downloaded to the current directory.
Related Articles
Creating a MySQL Database
The MySQL database allows you to store a lot of information with ease of access. Before using the database, first you must create one. Also, you need to create at least one MySQL user to access the database. Step 1 At your cPanel, in the "Databases" ...
Establishing remote connection to the MySQL database
Note: In this tutorial, we will be using DBeaver. 1.Open DBeaver Launch DBeaver. 2. Create a New Connection Click the "New Database Connection" button or press Ctrl + Shift + N. In the list that appears, select MySQL (you can type "MySQL" in the ...
MySQL Database
MySQL databases are required to run many web-based applications, such as information dashboards, content management systems, and online shopping carts. Step 1 Logged into your cPanel, in the DATABASE tab, locate the item “Manage My Database” note: ...
How to change database charset - MySQL
To change the MySQL charset, follow these steps: 1. Access the cPanel: Log in to your cPanel account. 2. Access phpMyAdmin: In cPanel, find the "Databases" section and click on "phpMyAdmin". 3. Select the Database: In phpMyAdmin, on the left panel, ...
How to restore Firebird backup from the terminal?
To restore the backup of your Firebird database, you must first access the Terminal through the cpanel in "Advanced" and then click on "Terminal". Once you have the Terminal open, you will enter the following commands: gbak -user YOUR_USER -pas ...