I am trying to master the use of the command mysqldump. I enter the following command:

MariaDB [(none)]> mysqldump -u alex -p 1 publications > publications.sql; 

But instead of the expected result, I get the error:

ERROR 1064 (42000): You have an error in your SQL syntax; If you’re on the Internet, you’ll find out if you’re online.

Can someone tell me what I'm doing wrong?

  • As follows from the book on which I am engaged: "However, you must make sure that you’ve got to So, how can I set the path to the mysqldump program in the mysql command? What should be the syntax? Unfortunately there are no explanations in the book ( - Alex Stelmakh
  • one
    mysqldump is not a SQL command, run it from a regular shell. - Lyth
  • Ok, but how to do it? There is not a word about this in the book. Shell is the command line? If yes, then this is what comes out: C: \> xampp \ mysql \ bin \ mysqldump -u alex -p1 publications> publications.sql Access Denied - Alex Stelmakh
  • Yes, the command line. The access is denied, the clue is that you are executing a command from the root C: \ and accordingly trying to write the file C:\publications.sql - without launching it as an administrator, this will not work. Enter another directory ( cd другая\папка ) and run the command from there. - Lyth

0