通过命令行将大型数据库导入mysqlAdmin时出现以下错误。
我正在使用沼泽。我首先使用管理员权限通过CMD登录mysql。
然后我使用以下命令登录mysql:
mysql -h localhost -u john -p
此后,我尝试使用以下命令上传数据库:
mysql> mysql -h localhost -u john -p magento < C:\Users\john\Desktop\sql\backup.sql
这是我得到的错误:
ERROR:
Unknown command '\U'.
ERROR:
Unknown command '\e'.
ERROR:
Unknown command '\D'.
--------------
mysql Ver 14.14 Distrib 5.7.21, for Win32 (AMD64)
Connection id: 55
Current database:
Current user: john@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.7.21 MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: cp850
Conn. characterset: cp850
TCP port: 3306
Uptime: 13 hours 22 min 26 sec
Threads: 1 Questions: 815 Slow queries: 0 Opens: 888 Flush tables: 1 Open tables: 327 Queries per second avg: 0.016
--------------
ERROR:
Unknown command '\l'.
答案 0 :(得分:3)
不要登录两次,只需运行
mysql -h localhost -u john -p magento < C:\Users\john\Desktop\sql\backup.sql