Custom my.cnf/local-infile=1 for one user

xerox

Verified User
Joined
Jul 16, 2019
Messages
145
Hello,

How to give limited access to local-infile=1 for one user only?

I am not sure how to do this with custombuild without future updates issues.

Anyone already know?

Specific commands would be much appreciated.

ThankS
 
Last edited:
I already tried to follow the instructions here:

but, the command eg. "UPDATE mysql.user SET File_priv='Y' WHERE user=blabla" will give me error:
Code:
ERROR 1348 (HY000): Column 'File_priv' is not updatable

Note: I have MariaDB 10.4 installed.

UPDATE: For MariaDB 10.4 version, the mysql.user table is changed to mysql.global_priv as the documentation explains, Now, I am not sure how to update the file_priv because the table structure differs from mysql.user table.

@smtalk, could you please explain and update the referenced da documentation?

Thanks.
 
Last edited:
connect to phpmyadmin using da_admin credentials, use mysql DB, find needed user there and modify it's privileges.
 
Thanks for the idea.

I also tried that in phpmyadmin but I get the same error when i try to change any specific user File_priv column value to Y.
Code:
#1348 - Column 'File_priv' is not updatable

Under the Browse tab in phpmyadmin table user, there is an notice on the header:
Code:
 Current selection does not contain a unique column. Grid edit, Edit, Copy and Delete features may result in undesired behavior.

I am not sure its related to the issue.

MariaDB documentation:
mysql.user Table - MariaDB Knowledge Base

To point out the update in 10.4, its written that:
Code:
MariaDB starting with 10.4
In MariaDB 10.4 and later, the mysql.global_priv table has replaced the mysql.user table, and mysql.user is now a view.
 
Last edited:
Not really I googled a bit and found this
I had this problem. I searched around and did not find a satisfactory answer. I summarise below the results of my searches.

The access denied error could mean that:

  • 'user'@'localhost' does not have the FILE privilege (GRANT FILE on *.* to user@'localhost'); or,
  • the file you are trying to load does not exist on the machine running mysql server (if using LOAD DATA INFILE); or,
  • the file you are trying to load does not exist on your local machine (if using LOAD DATA LOCAL INFILE); or,
  • the file you are trying to load is not world readable (you need the file and all parent directories to be world-readable: chmod 755 directory; and, chmod 744 file.dat)
 
Back
Top