Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2009
    Posts
    1

    Unanswered: 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

  2. #2
    Join Date
    Jun 2007
    Posts
    197

    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

  3. #3
    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

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    May 2009
    Posts
    7
    Thanks,
    Can you please guide me to how to take backup of procedures and Data from mysql database.?

  6. #6
    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

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •