mariadbHow to backup a table in Mariadb?
Backing up a table in MariaDB is a simple process. To do so, you can use the mysqldump
command. This command will create a backup of the table in the form of a SQL script.
Example
mysqldump -u username -p database_name table_name > backup.sql
This command will create a backup of the table named table_name
from the database database_name
and save it to the file backup.sql
.
The parts of the command are:
mysqldump
: The command to create a backup of a table.-u username
: The username used to connect to the database.-p
: The password used to connect to the database.database_name
: The name of the database containing the table.table_name
: The name of the table to be backed up.> backup.sql
: The file to save the backup to.
Helpful links
More of Mariadb
- What type to use for a year in Mariadb?
- How to use UUID in Mariadb?
- How to install Mariadb on Ubuntu?
- How to work with XML in Mariadb?
- How to get current year in Mariadb?
- How to check version of Mariadb?
- How to use xtrabackup in Mariadb?
- How to use window functions in Mariadb?
- How to use variables in Mariadb?
- Mariadb partitioning example
See more codes...