How to generate MySQL (backup) dump from the command line in Windows VPS?

This article will assist you how to generate MySQL (backup) dump from the Command line in the Windows VPS.

Mysqldump is an easy and quick tool to create a backup of MySQL databases. It creates a dump file of MySQL databases containing SQL commands to recreate the database at the destination MySQL server. It allows you to backup a single database and multiple databases as well.

It is a part of the MySQL relational database package that allows you to "dump" a database, or a collection of databases, for backup or transferral to another SQL server. 

How to use the mysqldump utility to create a backup of your database?

 

  1. Open a Windows command prompt from your VPS.
  2. Click Start -> Run.
  3. Enter “cmd” into the dialog box and click the “OK” button.
  4. Change the directory to the following to access the mysqldump utility.
    cd C:\Program Files\MySQL\MySQL Server 5.5\bin
  5. Create a dump of your current MySQL database.
  6. Run the mysqldump.exe program using the following arguments:
    mysqldump.exe –e –u[username] -p[password] -h[hostname] [database name] > C:\[filename].sql

If you supplied all the arguments correctly, it will connect to your current MySQL server and create a dump of your whole database in the directory you specified. Here is an example of the command line syntax:

example of the command line syntax

- Command syntax: mysqldump -u accutestuser accutest > c:\accutest.sql


  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Fix - Collection Max error, Cannot Connect to Server

Problem Statement Recently one of our customers was unable to connect to Collection Max and...

How to change phpMyAdmin password?

Following tutorial will guide you to reset the phpMyAdmin password. We assume that you have...

How to Stop and Start MySQL Service in Windows and Linux VPS?

This article will assist you to stop and start MySQL service from Windows VPS and Linux VPS....

How to Allow Remote Connection to MySQL Server in Windows?

This article will assist you to enable remote access to MySQL server through Windows command...

Fix :: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found

Error Message ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no...