![]() ![]() See MDEV-20500 for more information.įrom MariaDB 10.5.2, the error message is more accurate: The used command is not allowed because the MariaDB server or client It would be more accurate to say that the MariaDB configuration does not support the command. Note that it is not entirely accurate to say that the MariaDB version does not support the command. If the LOAD DATA LOCAL INFILE statement is disabled by either the server or the client and if the user attempts to execute it, then the server will cause the statement to fail with the following error message: The used command is not allowed with this MariaDB version If you are using a different client or client library, then see the documentation for your specific client or client library to determine how it handles the LOAD DATA LOCAL INFILE statement. If you are using MariaDB Connector/C, this can be done by unsetting the CLIENT_LOCAL_FILES capability flag with the mysql_real_connect function or by unsetting the MYSQL_OPT_LOCAL_INFILE option with mysql_optionsv function. The LOAD DATA LOCAL INFILE statement can be disabled on the client.The LOAD DATA LOCAL INFILE statement can be disabled on the server by setting the local_infile system variable to 0.If you don't want to permit this operation (perhaps for security reasons), you can disable the LOAD DATA LOCAL INFILE statement on either the server or the client. This allows you to load files from the client's local file system into the database. By contrast, when you execute the LOAD DATA LOCAL INFILE statement, the client attempts to read the input file from its file system, and it sends the contents of the input file to the MariaDB Server. When you execute the LOAD DATA INFILE statement, MariaDB Server attempts to read the input file from its own file system. See Configuring access to home directories. ![]() Note that MariaDB's systemd unit file restricts access to /home, /root, and /run/user by default. If the secure_file_priv system variable is set (by default it is not), the loaded file must be present in the specified directory. LOAD DATA LOCAL INFILE does not have this requirement. This is to ensure normal users cannot read system files. One must have the FILE privilege to be able to execute LOAD DATA INFILE. These clauses are optional, but if both are specified then the FIELDS clause must precede LINES.Įxecuting this statement activates INSERT triggers. The FIELDS and LINES clauses are the same in both statements. You can then read the files back into a table using the LOAD DATA INFILE statement. The file name must be given as a literal string.įiles are written to disk using the SELECT INTO OUTFILE statement. Reads rows from a text file into the designated table on the database at a very high speed. LOAD DATA INFILE is unsafe for statement-based replication. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |