Search code examples
mysqlheidisql

Mysql database backup by using query


I wanna dump file for MySQL database using query.I got the dump file when i used shell.but i could not get dump file while using heidisql.

In Shell:

C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin>
mysqldump -uroot -proot >"D:\backups\student.sql"

In Heidisql:

  1. C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\mysqldump -u root -p root databases student >"D:\student.sql"

  2. mysqldump -u root -p[root] [student] > D:/student.sql


Solution

  • mysqldump is an application, HeidiSQL is another one. You're creating an .sql file by telling an application to create it, either mysqldump or HeidiSQL. You cannot use both applications at the same time.

    In HeidiSQL, click on Tools > Export database as SQL, then follow the dialog.