数据库
首页 > 数据库> > 执行数据库sql脚本

执行数据库sql脚本

作者:互联网

参考链接 https://blog.csdn.net/xulianboblog/article/details/51086529

里面说有加符号<的,试了没有用

错误

mysql> source D:\mysql-5.7.25\sql_script\group.sql#这样老是报错 
ERROR:
Unknown command '\m'.
--------------
mysql  Ver 14.14 Distrib 5.7.25, for Win64 (x86_64)

Connection id:          8
Current database:       test
Current user:           root@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.7.25 MySQL Community Server (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
TCP port:               3306
Uptime:                 19 hours 26 min 33 sec

Threads: 1  Questions: 118  Slow queries: 0  Opens: 111  Flush tables: 1  Open tables: 101  Queries per second avg: 0.001
--------------

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 'source D:\mysql-5.7.25ql_script' at line 1
    -> ;
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 'roup.sql' at line 1

报错的原因估计是\被当成了转义字符,换了另外一种方法就好了

标签:脚本,characterset,数据库,sql,syntax,version,mysql,your
来源: https://www.cnblogs.com/Gaoqiking/p/12115047.html