Today, when I was backing up with mysqldump, an error occurred. The following is my command for backing up the database:
mysql> mysqldump -hlocalhost -uroot -p myempoyees student > "D:/backup/file.sql";
The following error reports occur:
ERROR 1064 (42000): 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 -hlocalhost -uroot -p myempoyees student >
"D:/backup/file.sql"' at line 1
But the command should be right
The result of online query: mysqldump is not a MySQL command, but a command line user program, which must be called by shell command line.
Execute the statement in the shell command window without entering the MySQL command
C:\Program Files\MySQL\MySQL Workbench 8.0>mysqldump -hlocalhost -uroot -p myempoyees student >"D:/backup/file.sql"
Enter password: ******
C:\Program Files\MySQL\MySQL Workbench 8.0>
Enter the password and the backup is successful!
Similar Posts:
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- [Solved] Backup mysql8.0 with the mysqldump of mysql5.7 Error
- Solution to empty backup file generated by mysqldump scheduled task
- How to Backup MySQL database regularly
- MySQL 5.7 installation, mysql. Plugin ‘doesn’t exist error resolution
- MYSQL Login Error: mysqladmin: connect to server at ‘localhost’ failed
- ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded
- [Solved] MYSQL8 Error: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
- [Solved] MYSQL export mysqldump version mismatch upgrade or downgrade your local MySQL client programs
- mysqldump[Warning] Using a password on the command line interface can be insecure