Contents
How to backup and restore MySQL or MariaDB database?
Let’s say we want to take the backup of mydb database and save it in a file mydb_dump.sql file. And let’s say the username and password is dbuser and dbpassword respectively. So, we will run the following command in the terminal.
What is mysqldump client for MariaDB 10.5.2?
From MariaDB 10.5.2, mariadb-dump is the name of the command-line client, with mysqldump a symlink. The mysqldump client is a backup program originally written by Igor Romanenko. It can be used to dump a database or a collection of databases for backup or transfer to another database server (not necessarily MariaDB or MySQL).
What to do if you lose your data in MariaDB?
If you lose your data in MariaDB, but have been using mysqldump to make regular backups of your data in MariaDB, you can use the dump files to restore your data. This is the point of the back-ups, after all. To restore a dump file, it’s just a matter of having the mysql client execute all of the SQL statements that the file contains.
How to restore a dump of MySQL database?
Restoring a MySQL dump # You can restore a MySQL dump using the mysql tool. The command general syntax is as follows: mysql database_name < file.sql In most cases you’ll need to create a database to import into. If the
Do you need to uninstall MySQL to install MariaDB?
Within the same base version (for example MySQL 5.5 -> MariaDB 5.5, MySQL 5.6 -> MariaDB 10.0 and MySQL 5.7 -> MariaDB 10.2) you can in most cases just uninstall MySQL and install MariaDB and you are good to go. There is no need to dump and restore databases.
What should thread cache size be in MariaDB?
If you don’t use MyISAM tables, you can set key-buffer-size to a very low value, like 64K. If using MariaDB 10.1 or earlier, and your applications often connect and disconnect to MariaDB, you should set up thread-cache-size to the number of concurrent queries threads you are typically running.
What kind of storage engine does MariaDB use?
MariaDB uses by default the Aria storage engine for internal temporary files instead of MyISAM. If you have a lot of temporary files, you should add and set aria-pagecache-buffer-size to the same value as you have for key-buffer-size .