第一次使用mysql备份数据库mydb是出现如下错误。麻烦帮忙。。谢谢!!
mysql> mysqldump -hlocalhost -uroot -p123 mydb -A -R>c:/test.txt;
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 'mysql
dump -hlocalhost -uroot -p123 framework -A -R>c:/test.txt' at line 1
mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
check the manual that corresponds to your MySQL server version for the right syntax to use near
运行->CMD->进入MYSQL目录->CD BIN->
mysqldump -uroot -p 数据库名> D:\TEMP\wcnc.sql
mysqldump -uroot -p mydb>dbback.sql
直接在操作系统下运行下试试。
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 'mysq
dump -uroot -p mydb>dbback.sql' at line 1
mysql>
开始->运行->CMD->进入MYSQL目录->CD BIN->
mysqldump -uroot -p 数据库名> D:\TEMP\wcnc.sql
C:\Program Files\MySQL\MySQL Server 6.0\bin>mysqldump -u root -p mydb>c:\mydb.s
ql;
Enter password: ***
mysqldump: Got error: 1049: Unknown database 'mydb;' when selecting the database
SHOW CREATE DATABASE
显示
+--------------------+
| Database |
+--------------------+
| information_schema |
| itcast |
| jeecms_2_1_0_beta |
| localdb |
| mydb |
| mysql |
+--------------------+