0

I want to dump my database into one file with .sql extension using command line. I've tried all the possible actions suggested in https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html

mysqldump test > dump.sql

but it gives me this error:

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 gamescholar > dump.sql' at line 1

so why I am getting this error and how to fix it?

note--> the database is already there I checked it using show databases; command.

1
  • 1
    Run the "mysqldump" command from the command line, not from inside the mysql client. It's not an SQL command. Commented Jan 2, 2019 at 22:28

1 Answer 1

2

you need to execute mysqldump command inside shell

you are trying to run command inside MySql Client

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.