Question How to backup and restore MySql database

nsoni

Member
Joined
Jan 6, 2008
Messages
11
Programming Experience
1-3
Hi, I would really appriciate if anybody can guide me about the backup and restore mysql database.
I have installed MySql server5.0.42 on windows xp sp3. I know how to create database, tables and inserting rows through from command prompt only.
i have created a db named 'search' having 3 tables. I tried to make backup using following command
mysql> mysqldump search > backupsearch.sql
where i am getting Error 1064 you have an error in your SQL syntax; check the mannual that corresponds to your MySql server version for the right syntax to use near 'mysqldump search > backupsearch.sql'

Can anybody give me the exact way to backup and restore mysql db.

With Kind Regards
 
The easiest way for you would be go to mysql.com website, check download section and download tools for MySQL.
Using MySQL Administrator you can easily do backup and later on restore of your database.

Hope this helps
 
hi
when you get 1064 error number , it means u you logged in Mysql.exe
before log in this file , in the /bin folder you have to type this command
mysqldump -u [your username] -p [your pass] [database name] > [database name for backup.sql]
becuase mysqldump is another file that u were tying to call it within mysql.exe
if you want to restore your database
in the command prompt again , go to /bin path
& then type
mysql -u [username] -p [password] [databasename] < [the file that u back up already]
 
Back
Top