If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to backup and restore MySql database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-09, 04:52
ayzaina ayzaina is offline
Registered User
 
Join Date: Mar 2009
Posts: 1
How to backup and restore MySql database

Dear All,

I have installed MySql Server5.0.42 on windows xp sp3. I know how to create database, tables and inserting rows through Mysql Command line only.

I have created a database named 'search' having 3 tables. I tried to make backup using following command

mysql> mysqldump -u root -p 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 provide me the solution for above issue.

Regards
ayzaina
Reply With Quote
  #2 (permalink)  
Old 03-02-09, 00:30
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile

Quote:
Originally Posted by ayzaina
Dear All,

I have installed MySql Server5.0.42 on windows xp sp3. I know how to create database, tables and inserting rows through Mysql Command line only.

I have created a database named 'search' having 3 tables. I tried to make backup using following command

mysql> mysqldump -u root -p 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 provide me the solution for above issue.

Regards
ayzaina
no need to enter in mysql prompt
got to run type cmd (enter) here you will execute mysqldump command
Reply With Quote
  #3 (permalink)  
Old 11-12-09, 07:59
amolnavale amolnavale is offline
Registered User
 
Join Date: May 2009
Posts: 7
hi ayzaina,

I am Amol from Pune,India.
I am also looking for any backup and restore database command. I am new to mysql.
I also got same error which u got.
Have you solve that problem ?
if yes please reply me how u have solved that problem.

Thanks in advance,
Amol
Reply With Quote
  #4 (permalink)  
Old 11-12-09, 08:15
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
Quote:
Originally Posted by amolnavale View Post
I also got same error which u got.
post #2 in this thread identified the problem

mysqldump is a shell command, not a mysql command

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 11-12-09, 08:46
amolnavale amolnavale is offline
Registered User
 
Join Date: May 2009
Posts: 7
Thanks,
Can you please guide me to how to take backup of procedures and Data from mysql database.?
Reply With Quote
  #6 (permalink)  
Old 11-03-11, 11:18
alejandroarauz alejandroarauz is offline
Registered User
 
Join Date: Nov 2011
Posts: 3
mysqldump

Here is an example of the mysqldump command:
mysqldump --opt --host=localhost --user=myUser --password=myPass --result-file=C:\Backups\myBackupFile.sql myDatabase

The mysqldump command has many options, you can check the docsfor more information
Reply With Quote
  #7 (permalink)  
Old 11-03-11, 13:19
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
alejandro, thanks for your effort, but please do not revive a thread that has been dead for so many years

the original poster is surely not still waiting for an answer, and if there's anyone else who has a question about mysql backups, we want them to start a new thread
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On