Digital Marketing

Fixed: "MySQL server is running with the –secure-file-priv” Error

The variablesecure_file_priv is used to limit the effect of data import and export operations. 

Example of the affected operations is those performed by the LOAD DATA andSELECT ... INTO OUTFILE statements and the functionLOAD_FILE(). These operations are permitted only to users who have the FILE privilege.


mysql> SHOW VARIABLES LIKE "secure_file_priv";
+------------------+-----------------------+
| Variable_name | Value |
+------------------+-----------------------+
| secure_file_priv | /var/lib/mysql-files/ |
+------------------+-----------------------+
Changing secure-file-priv variable directory

[mysqld]
secure-file-priv=/new-location
sudo systemctl restart mysqld

Diable secure-file-priv variable To disable it, set the variable to an Empty value.
[mysqld]
secure-file-priv = ""
sudo systemctl restart mysqld

Comments

Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership