database backup error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raaman rai
    New Member
    • Oct 2007
    • 114

    database backup error

    i am trying to backup my MySQL database using the following command but it generates error. I am using WAMP 2.0 server and is an XP machine.
    [HTML]
    mysqldump -u root -p 123456 db > backup.sql;
    [/HTML]
    [HTML]
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
    version for the right syntax to use near 'mysqldump -u root -p 123456 db > backup.sql' at line 1
    [/HTML]
    What is the problem? the MySQL version used is 5.0.45.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    mysqldump is not a SQL statement. It is a command line tool that is supposed to be used from outside MySQL.
    You should simply issue that command in a CMD window without login into MySQL first.

    Comment

    • raaman rai
      New Member
      • Oct 2007
      • 114

      #3
      Thankyou i was able to backup the database. But a new problem has arised. It is found out that the INSERT command terminates in halfway if you have huge number of records to be restored. It simply stops in between and shows the following information.
      [HTML]
      /*!40000 ALTER TABLE `tblcompany` ENABLE KEYS */;
      UNLOCK TABLES;
      [/HTML]
      Thereafter even if i give ';' it doesnt show the completed or "Query Ok" message. So what could be the problem?

      Comment

      • raaman rai
        New Member
        • Oct 2007
        • 114

        #4
        It seems the problem is with the storage engine because my tables are of type InnoDB. Now how should i change the tables into type MyISAM?

        Comment

        Working...