![]() ![]() Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL databases. Read 42 user reviews and compare with similar apps on MacUpdate. You need to set ‘ secure_file_priv‘ with an empty value as shown below and restart MySQL service. Download the latest version of Sequel Pro for Mac for free. Step 3: Restart MySQL service: # /etc/init.d/mysqld restart How to disable/remove secure_file_priv in MySQL? Secure_file_priv="/usr/local/mysql-files" How to change the value of secure_file_priv in MySQL? So, what if you want to output into a different directory? To do that, you need to restart MySQL service with new value set to secure_file_priv option. Let’s check this now! mysql> select option_value from wp_options WHERE option_value LIKE ('%sess%') INTO OUTFILE '/var/lib/mysql-files/sam.txt' How to repeat: Set 'secure-file-priv' to NULL in '/etc/my. Instead, mysqld creates a directory called 'NULL' in the root file system on startup. Similarly, if you want to output into a file (export), then it can only output to file that’s located within this directory. Description: According to the documentation setting the 'secure-file-priv' configuration option to NULL should result in the feature being disabled. It means, if you ever want to load a file (import), then the file should be located within this directory. You should be able to import or export data using MySQL LOAD DATA and SELECT INTO FILE statements. | secure_file_priv | /var/lib/mysql-files/ |Īs you can see the value of ‘ secure_file_priv‘ is ‘ /var/lib/mysql-files‘. You need to put the following content in your my.cnf (Mac, Linux) or my.ini (Windows) file: mysqld securefilepriv '' Once you edit the configuration file, save it and restart your MySQL server. mysql> show variables LIKE "secure_file_priv" To fix this error, you need to check the value of ‘ secure_file_priv‘ option. You might also get the above error while loading data file using ‘ LOAD DATA INFILE‘ in MySQL. ![]() Here are the snapshots of the error: mysql> select option_value from wp_options WHERE option_value LIKE ('%sess%') INTO OUTFILE '/tmp/sam.txt' ĮRROR 1290 (HY000): The MySQL server is running with the -secure-file-priv option so it cannot execute this statement If you are getting an error “ The MySQL server is running with the secure_file_priv option so it cannot execute this statement” while using ‘ LOAD DATA INFILE‘ or ‘ INTO OUTFILE‘, then here’s how you can fix it. ![]()
0 Comments
Leave a Reply. |