MySQL Backup Command Line Program
MySQL Backup Command Line Program
Automatic Backup Scheduler for MySQL > Help Document > MySQL Backup Command Line Program

MySQL Backup Command Line Program


How to back up or restore MySQL databases by MySQL Backup Command Line Program?

Automatic Backup Scheduler for MySQL offers a Command Line Program, you can use it to back up and restore MySQL databases manually.
Open the command prompt window and enter the full path of the installation folder, enter "mysqlbackup.exe" to use MySQL Backup Command Line Program.
MySQL Backup Command Line Program

For example:
C:\>cd C:\Program Files\Automatic Backup Scheduler for MySQL
C:\Program Files\Automatic Backup Scheduler for MySQL>mysqlbackup.exe

Or you can enter "mysqlbackup.exe" directly under any folders in the command prompt windows if you have added the application directory to your environmental path.

Help for command line:

Enter --help to show the options of MySQL Backup Command Line Program.
Use commands as the following samples to run a task:

  1. mysqlbackup --from [CONNECTION OPTIONS] --to [CONNECTION OPTIONS] --database [DB]
  2. mysqlbackup --from [CONNECTION OPTIONS] --to --file [FILE PATH] --databases [DB1 DB2 ...]
  3. mysqlbackup --from --file [FILE PATH] --to [CONNECTION OPTIONS] --all-databases
For example:
mysqlbackup --from -h www.databasethink.com --port 3306 -u root -p admin --to --file "C:\Users\Administrator\Documents\databasethink.sql" --all-databases

Note:
  1. Please grant the user account enough privileges to access the remote MySQL database ( % or a specified IP address ).
  2. Please grant the user account enough rights to create files under the specified folder.
The detailed description of the parameters:
  1. --from : Set the connection options of source MySQL server or file to back up or restore.
  2. --to: Set the connection options of destination MySQL server or file to back up or restore.
    1. [CONNECTION OPTIONS]: They are available in --from and --to.
      1. -h name: The host name ( e.g. www.databasethink.com ) or IP address ( e.g. 127.0.0.1 ) of the MySQL server.
      2. --port number : The port of the MySQL server, the default port is 3306.
      3. -u name: The name of the user on the MySQL server.
      4. -p[ name]: The user's password on the MySQL server. It is not necessary if the user has no password.
      5. --default-character-set name: Set the default character set. It's used for non-English ( German, French, Italian, Russian, Chinese, Japanese, Korean, etc. ). It includes Unicode, UTF8, etc. The default value ( Automaticlly detect ) is recommended.
      6. --protocol name: The protocol to use for connection (tcp, socket, pipe, memory).
      7. --compress: Use compression in server/client protocol to connect to a MySQL server, if the server permits compression connections. It's used to reduce network traffic.
      8. --ssl: Use SSL protocol to connect to a MySQL server, if the server permits SSL connections. It allows you to establish secure network connections.
        1. --ssl-ca name: The full path name to a directory that contains trusted SSL CA certificates in PEM format.
        2. --ssl-cert name: The path name to the certificate file ( X509 cert in PEM format ).
        3. --ssl-cipher name: A list of permissible ciphers to use for SSL encryption. It includes AES256, DHE, RSA and SHA.
        4. --ssl-key name: The path name to the key file ( X509 key in PEM format ).
        5. --ssl-verify-server-cert: Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.
      9. --socket name: The socket file to use for connecting to a MySQL server, if the server permits socket connections.
      10. --pipe-name name: The pipe name of named pipes to use for connecting to a MySQL server, if the server permits socket connections.
      11. --shared-memory-base-name: The base name of the Shared-Memory to use for connecting to a MySQL server, if the server permits shared-memory connections.
    2. --file FILE PATH: Enter the source or destination file to restore or back up.
  3. --database name: Enter a single database which you want to back up or restore.
  4. --databases name1 name2 ...: Enter multiple databases ( separated by space ) which you want to back up or restore.
  5. --all-databases: Back up or restore all databases without the system databases.
  6. --all-tablespaces: Back up or restore all tablespaces.
  7. --no-tablespaces: Don't back up or restore any tablespaces.

How to back up or restore MySQL databases by Windows GUI program?
Copyright © 2024 Database Think Software. All rights reserved.