

For more details about password security, see MySQL’s End-User Guidelines for Password Security. In the password is omitted, mysqldump prompts you for the password before connecting to the database. The password can be entered directly in the command itself (though that is not recommended due to security concerns) or the password can be omitted (by just using the -password option with no value).

Password ( -password= or -p): Specifies that the user’s password is required for the connection. This user must have proper grants to access the database. Username ( -user= or -u ): The username of your MySQL user.

When backing up a Linode MySQL Managed Database with mysqldump, review the Connect to a MySQL Managed Database guide for instructions on viewing the connection details (including the username, password, host, and port). Multiple specific databases: mysqldump -databases > backup.sqlĪll databases: mysqldump -all-databases > backup.sql Specific tables in single database: mysqldump > backup.sql See Common Command Options for a list of available options.

Within the commands, represents all of the command options required to perform the backup according to your own needs. The following list represents mysqldump commands for various scenarios. If mysqldump and mysql are not installed, see the Installing MySQL guide.Įnsure your MySQL user has proper grants: The MySQL user you intend to use to export your existing database must have SELECT, LOCK TABLES, SHOW VIEW, and TRIGGER grants. This should inform you which version you are using as well, needed when referencing the documentation. Run the following command to verify that mysqldump is installed: mysqldump -version This system needs a MySQL command-line client installed (which should come with the mysqldump utility). Log in to the system where you intend to capture or store your backups. If you do not have a MySQL instance yet, you can create a Managed Database, deploy the MySQL Marketplace App, or install MySQL server (or MariaDB) on a Compute Instance. Obtain the connection details for the MySQL instance you wish to use. If the database is not accessible for any reason, you can instead create a physical backup, which is a copy of the file system directory containing your MySQL database. Since the mysqldump utility needs to connect to the database, the database management software must be running and accessible.
