DeskNow Knowledge Base
Home Backup and migration How to backup the MySQL database

How to backup the MySQL database

The easiest method is to use a free utility available on, called MySQL Administrator. It can perform backups and restores from a graphical interface, and also schedule backups. (Tip: in the backup options, choose 'InnoDB online backup' and enable 'Complete backup')


An alternative method is to do it via command line. It is detailed below.


  1. type the following command:

    mysqldump --user=desknowserver --password=password --single-transaction --skip-opt --add-drop-table --add-locks --create-options --disable-keys --extended-insert --quick --set-charset desknow > /var/backup-desknow.sql
  2. this will generate a sql file with all the commands to recreate the database. In this example, the file would be saved as /var/backup-desknow.sql


  1. enter the mysql console (example: mysql -u root -p but this may depend on your MySQL installation)
  2. re-create an empty desknow database
    1. create database desknow character set utf8;
    2. grant all privileges on desknow.* to desknowserver@localhost identified by 'password';
    3. grant all privileges on desknow.* to desknowserver@'%' identified by 'password';
  3. exit the mysql console ( type \q  and press <enter>)
  4. type the following commands:
    mysql --user=desknowserver --password=password desknow
    SOURCE /var/backup-desknow.sql


Email Article Email
Print Article Print

How helpful was this article to you?
Related Articles
article How do I make the DeskNow service start after the database server?
This article applies to Windows environments...

  May 27, 2004    Views: 67776   
article How to backup the PostgreSQL database
Linux/Unix Backup: pg_dump -U desknowserver...

  October 6, 2004    Views: 72762   
article Performance tuning for MySQL database
By default MySQL is installed with very...

  April 11, 2006    Views: 25073   

Powered by Lore :: (c)2003 Pineapple Technologies.