手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

mysql ERROR 1148 解决方法

时间:2024-10-29 02:43:16

1、当上传本地文件到mysql服务器时,loaddatalocalinfile“c:/test.txt”intotable test(test);

2、mysql报错:ERROR 1148 (42000): The used command is not allowed with this MySQL version

3、原因是mysql版本不支持检查一下mysql版本号:mysql> select version();mysql5.1或者以上的都支持loaddatalocalinfile操作

4、解决方法:登录是加--local-infile 可解决问题例子: mysql --local-infile -u test -p

5、如果你觉得每次都要加参数很麻烦,可以在安装时加上--enable-local-infile例子:./configur髫潋啜缅e --prefix=/usr/local/mysql --enable-local-infilemakemake install

© 手抄报圈