How to Backup a MySQL Database Using the Command Line

How to Backup a MySQL Database Using the Command Line

Stores that use Retail Pro Prism on a MySQL database should create regular backups, just like any other Retail Pro system. This can be accomplished very easily by using a command line task to backup the MySQL database. 

Step 1: Add the location of MySQL executables to the Environnment Variables Path.

Control Panel > System > Advanced System Settings > Environment Variables


Step 2: Once you have added the location to the Path, you can test the location by executing the following command in the command line prompt: "mysql -u root -p rpsods"

Step 3: To backup the MySQL database, you will need to use the following mysqldump command:

Mysqldump -u USERNAME -p PASSWORD rpsods > FILENAME.sql

This will create a single .sql file in the location that you ran the file from, in our example the C:\Users\sysadmin\rpsods.sql file would be created. 

WARNING: This will overwrite any files you currently have in this location, move and rename files as needed.

Published on May 16, 2017 in Backup & Recovery


Find Another Article