1. Type:

    mysqldump -u root -p us_presidents > ./backups/us_presidents.sql

    then press ENTER.

Here's an explanation of this command string:

  • mysqldump

    mysqldump -u root -p us_presidents > ./backups/us_presidents.sql

    The mysqldump command does exactly what it says—it connects to the MySQL server, selects a database, then dumps all the information from it into a text file.

  • -u root -p

    mysqldump -u root -p us_presidents > ./backups/us_presidents.sql

    The -u command tells mysqldump to use the MySQL root user account to connect to the MySQL server.

    The -p command tells MySQL to prompt the user for a password.