MySQL ERROR : The used command is not allowed with this MySQL version 解决办法

目的:向MySql数据库导入.txt文件,通过load命令来实现

输入如下命令,报错:

修改命令,依旧报错:

可能原因(from mysql reference manual):

If LOAD DATA LOCALis disabled, either in the server or the client, a client that attempts to issue such a statement receives the fol-lowing error message:

ERROR 1148: The used command is not allowed with this MySQL version

可见,出于安全考虑,默认是不允许从client host远程通过load data命令导数据的

解决办法:

登录MySql时,需用--local-infile[=1]显式指定参数

问题解决

时间: 2024-08-26 09:31:02

MySQL ERROR : The used command is not allowed with this MySQL version 解决办法的相关文章

Spring Boot连接MySQL长时间不连接后报错`com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.`的解决办法

报错:com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection closed. 添加 &autoReconnect=true 无济于事,此选项好像仅对 MySQL 5之前的版本有效. 原因 Mysql服务器默认的"wait_timeout"是8小时,也就是说一个connection空闲超过8个小时,Mysql将自动断开该connection.这

LOAD CSV ERROR: The used command is not allowed with this MySQL version

要执行的sql 把csvload进db LOAD DATA LOCAL INFILE '/path/datas/temp.csv' INTO TABLE test_table_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS; 把客户端和server端 local_infile 都设置为True/ON # server端 mysql> SHOW VARIABLES LIK

【mysql】 load local data infield 报错 ERROR 1148 (42000): The used command is not allowed with this MySQL version

mysql> load data local infile '/Users/flint/learn/mysql/pet' into table bx_pet; 执行报错 ERROR 1148 (42000): The used command is not allowed with this MySQL version 解决办法: 在连接数据库的时候使用 mysql --local-infile -uroot -p 连接即可 原文地址:https://www.cnblogs.com/china-

R语言连接MySQL报错:could not run statement: The used command is not allowed with this MySQL version

版本说明 R版本:3.5 MySQL版本:8.0 RMySQL版本:0.10.19 情景说明: 使用RMySQL成功连接到MySQL数据库,可以进行查询操作,但在插入时报错,提示信息如下: con <- dbConnect(MySQL(), host="127.0.0.1", dbname="epid", user="root", password="1234")dbWriteTable(con,"city_d

虚拟机中MySQL连接问题:Lost connection to MySQL server at &#39;reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql

环境:在VirtualBox中安装了Ubuntu虚拟机,网络使用了NAT模式,开启了端口转发. 局域网内其他计算机访问虚拟机中的MySQL Server出现两个问题: Lost connection to MySQL server at 'reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql 1.解决Lost connection to MySQL server

[mysql]ERROR 1364 (HY000): Field &#39;ssl_cipher&#39; doesn&#39;t have a default value 解决方法

在MySQL数据库中的mysql.user表中使用insert语句添加新用户时,可能会出现以下错误: ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value 原因是在my.ini配置文件中有这样一条语句 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 指定了严格模式,为了安全,严格模式禁止通过insert 这种形式直接修改mysql库中的user表进行添加新用户

mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

mysql启动报错Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 查看mysql错误日志也没有写入. 最后发现是selinux打开,汗…… 参考 mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

Hbase出现ERROR: Can&#39;t get master address from ZooKeeper; znode data == null解决办法

问题描述如下: hbase(main):001:0> list TABLE ERROR: Can't get master address from ZooKeeper; znode data == null Here is some help for this command: List all tables in hbase. Optional regular expression parameter could be used to filter the output. Examples:

mysql的The user specified as a definer (”@’%&#39;) does not exist 的解决办法

两种可能: 1.用户权限不够 赋给用户所有权限试试 mysql> grant all privileges on *.* to [email protected]"%" identified by "."; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) 2.有可能这个视图或者函数的创建人不是当前的用户.一