MySQL dump command not working [Answered]RSS

2 replies

Last post Mar 04, 2016 06:30 AM by Jean Sun

  • MySQL dump command not working

    Mar 04, 2016 12:52 AM|gc83|LINK

    Hello!

    I am trying to use the MySQL dump command to export a database file to upload to my hosting site. This is the command that I am using:

    mysqldump -u username -ppassword databasename > dumpfile.sql

    I get this error message:

    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 username -ppassword databasename > dumpfile.sql' at line 1

    What am I doing wrong? 

    Thanks in advance!

  • Re: MySQL dump command not working

    Mar 04, 2016 01:03 AM|lextm|LINK

    MySQL has its own support channel,

    https://www.mysql.com/support/

    Or you might post to http://stackoverflow.com

    This is a forum dedicated to IIS.

    Lex Li
    IIS Consulting Services at https://support.lextudio.com/services/consulting.html
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: MySQL dump command not working

    Mar 04, 2016 06:30 AM|Jean Sun|LINK

    Hi,

    You can try removing the space between -u and username. Or try use absolute file path of dumpfile.sql.

    mysqldump -uusername -ppassword databasename > [Absolute-Path]\dumpfile.sql

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.