Mysql数据导入excle表中数据遇到:Loading local data is disabled; this must be enabled on both the client and server sides这个问题
1.show global variables like ‘local_infile’;
查看权限是打开的,还是关闭的?如果出现off进行第二步
2.set global local_infile = ‘ON’;
打开权限
3.退出,再重新登录
在cmd命令中输入:mysql --local-infile=1 -u root -p
4.use 数据库名
5.如果遇到目录问题
File ‘C:Programs eacher.txt’ not found (OS errno 2 - No such file or directory)
6.将\改为\\
比如: C:\Programs\teacher.txt
7.如果遇到自复习问题
Invalid utf8mb4 character string: ‘’
8.load data local infile “C:\xingxi.txt”
-> into table teacher3
-> character set gbk 多加一行这个就行
-> fields terminated by “\t”;