I am writing in the mysql desktop console

mysqldump -uadmin -p9047scw mysql > mysqldump.sql; 

gives:

ERROR 1064 (42000): You have an error in your SQL syntax; check the syntax of the user interface mysqldump -uadmin -p9047scw users> mysqldump.sql 'at line 1

Like all syntax

 mysqldump -u [username] -p [password] [database] > [dump_name.sql] 

I do not understand what's wrong?)

    1 answer 1

    mysqldump is a console command, you are trying to execute it as an SQL query, this is not correct

    • Yes, like I use it as a console command in the mysql command line? yadi.sk/i/iyh49MHsuXyEk - Egor Tregubenko
    • one
      @ YegorTregubenko The fact of the matter is that it needs to be done from the same place where you call mysql - etki
    • @Etki in the php file chtoli?) - Egor Tregubenko
    • @ YegorTregubenko not, from the console - etki
    • where does php? do not enter the mysql client and execute the command in the console. Guess what people use mysql client for? That's right, to execute the SQL code there, so the database dump is not from under the client. Open the console and execute mysqldump - Invision