Claim your Biolink Click Here
2 like 0 dislike
693 views
while exporting the mysql data to csv getting the below error

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
in Education & Reference by (1.6k points) | 693 views

1 Answer

0 like 0 dislike
Best answer

Use the below command to check the path

mysql> SHOW VARIABLES LIKE "secure_file_priv";
+------------------+-----------------------+
| Variable_name    | Value                 |
+------------------+-----------------------+
| secure_file_priv | /var/lib/mysql-files/ |
+------------------+-----------------------+
1 row in set (0.02 sec)

then export to this path like

select * from TABLE where age > '30'   INTO OUTFILE '/var/lib/mysql-files/age.csv';
by (4.6k points)

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
2 like 0 dislike
1 answer
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,308 questions
1,469 answers
568 comments
4,809 users