MySQL Forums
Forum List  »  General

Re: SELECT * INTO OUTFILE doe not work on Windows
Posted by: Wei Jiang
Date: June 29, 2021 09:27AM

Thank you for your reply.


I create c:\in and reset mysql, restart server:

mysql> SHOW VARIABLES LIKE "secure_file_priv";
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| secure_file_priv | c:\in\ |
+------------------+--------+
mysql> SELECT * INTO OUTFILE 'c:\in\tournament.csv'
-> FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"'
-> LINES TERMINATED BY '\n'
-> FROM tournaments

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
mysql> quit
Bye

D:\a\database>dir c:\in
Volume in drive C is OS
Volume Serial Number is E4A7-B3DF

Directory of c:\in

06/29/2021 08:17 AM <DIR> .
06/29/2021 08:17 AM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 58,939,117,568 bytes free

My mysql version:
Your MySQL connection id is 8
Server version: 8.0.21 MySQL Community Server - GPL

Anything wrong with my mysql version?

Options: ReplyQuote


Subject
Written By
Posted
Re: SELECT * INTO OUTFILE doe not work on Windows
June 29, 2021 09:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.