#How to fix error code 1290 on mysql on mac how to
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' Similarly, if you want to output into a file (export), then it can only output to file that’s located within this directory. Now, you should be able to load data file or output into a file that’s located anywhere in the system. It means, if you ever want to load a file (import), then the file should be located within this directory. (or) Alternatively, you can set NULL as value to securefilepriv. | secure_file_priv | /var/lib/mysql-files/ |Īs you can see the value of ‘ secure_file_priv‘ is ‘ /var/lib/mysql-files‘. mysql> show variables LIKE "secure_file_priv" When I rebooted my computer, it won't let me go to. To fix this error, you need to check the value of ‘ secure_file_priv‘ option. I wanted to erase data on my hard drive, and after that, I went to reinstall OS X via Internet Recovery. 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 want to try to fix it, you are welcome. My C code makes an API request to a website, but the authentification method changed from user/password to a 'random token'. 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. Dear freelancers, I need help fixing a small project.