MySQL / MariaDB

Last updated: ... / Reads: 252 Edit

Backup Mysqldump

apt-get install mysql-client-*

apt-get install mysql-client-5.1

mysqldump -h hostname -u root -p database_name > backup.sql;

mysqldump -u root -p database_name table_name > backup.sql;

mysqldump -u root -p database_name table1 table2 > backup.sql;

mysqldump -u root -p --databases db1 db2 > backup.sql;

Restore

mysql -u root -p database_name < backup.sql

mysql -u root -p < backup.sql

Options:

mysqldump --default-character-set=utf8

Ref

Configuring MariaDB with Option Files


Comments

Make a comment