Mysql database reported an error when loading file contents into the table:
mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet
LINES TERMINATED BY '\r\n';
ERROR 1148: The used command is not allowed with this MySQL version
. If LOAD DATA LOCAL is disabled, either in the server or the client, a client that attempts to issue such a statement receives the following error message:
ERROR 1148: The used command is not allowed with this MySQL version
. For security reasons, The default is not allowed to load data remotely from client host.
Solution:
in two steps:
SET GLOBAL local_infile=1;
When connecting to the database
mysql -u Name -p --local-infile=1;
When using
conn = pymysql.connect(host="localhost",
user="root",
password="111",
db="work2forecast",
charset="utf8mb4",
local_infile=1)
div>
Read More:
- MySQL: if the remote connection using navicatip fails, prompt “is not allowed to connect to this MySQL server”
- Host is not allowed to connect to this MySQL server
- MySql 8.x java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
- The python version output from the command line is inconsistent with the python version in the current CONDA environment
- [error handling] when logging into MySQL with CentOS command, an error 1045 (28000) is reported
- Version 1.8.0_201 of the JVM is not suitable for this product. Version: 11 or greater is required.
- [Error][IntelliJ IDEA] Element XXX is not allowed here
- 2021 / 06 / 28 error – because the script PowerShell is not allowed to run on this system
- Eclipse specifies JDK version to start, and resolves version XXXX of the JVM is not suitable
- hive is not allowed to impersonate anonymous
- Function definition is not allowed here
- Array initializer is not allowed here
- The MySQL load data command parses and handles error 29 (errCode: 13) errors (in the Ubuntu environment)
- How to handle when select single is not allowed in loop
- Error (1820) if the password is not changed in time after MySQL installation
- Start eclipse and prompt version 1.7.0_ 79 of the JVM is not suitable for this product. Version: 1.8 or greater i…
- db2 Database Error: table space access is not allowed
- Solve the problem that the delete request is not available under SpringBoot. There was an unexpected error (type=Method Not Allowed, status=405).
- ERROR Invalid options in vue.config.js: “plugins“ is not allowed
- The binary version of its metadata is 1.5.1, expected version is 1.1.16