How to do it...

The mysqldump utility comes along with the mysql binary, so you do need to install it separately. Most production scenarios are covered in this section.

The syntax is as follows:

shell> mysqldump [options]

In the options, you can specify the username, password, and hostname to connect to the database, like this:

--user <user_name> --password <password>or-u <user_name> -p<password>

In this chapter, --user and --password are not mentioned in every example, to keep the reader focused on other important options.

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.