Error code 모음/1. SQL errors

[Mysql 에러] ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides 에러 윈도우

쟈누이 2020. 5. 25. 19:23
반응형

이것만큼 골치아픈 것도 없을 것이다....후

 

1시간에 걸쳐서 사투한 끝에 겨우 풀었는데..

위에서 하라는대로 다 했엇다..

 

이 에러가 왜 나는 것인지는 아직 제대로 이해하지는 못했지만..풀어내서 우선

기록해둔다.

 

1. MYSQL 쉘에서 SET GLOBAL local_infile=1; 를 입력한다

- 자세히는 모르겠지만 LOCAL INFILE 설정을 없애주는 것 같다.

2.  그 다음에 서버를 종료시켰다 다시 킨다

3. load 할 파일을 입력한다. -  나의 경우에는 csv 파일이었다.

load data infile [ 파일 경로 ]

into table team
fields terminated by ','
lines terminated by '\n'

이렇게 하면 대게는 실행이 된다...

하지만 나의 경우에는error code 1290 이 떴었다.

이런 경우는 mysql 이 보안상의 이유로 함부로 데이터를 아무데나 저장을 못하게 설정을 해두었기 때문에 생긴 문제였다.

4. 아래의 링크를 참고하여 나는 my.ini 파일에서 secure file priv 경로를 수정하고 난 뒤에 mysql workbench 를 껐다가 다시 켰다

https://118k.tistory.com/904

 

[MySQL][Error] Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statem

MySQL 에서 파일의 데이터를 Load할 때 1290 에러가 발생하는 경우가 있습니다. MySQL 8에서는 로컬의 데이터를 입력할 때 보안상의 이유로 지정한 장소의 파일만 업로드가 가능합니다. 에러코드 Error

118k.tistory.com

 

my.ini 파일에 들어가서 경로를 수정하거나 해당 경로에 파일을 넣고 3번 과정으로 다시 돌아갔었다.

 

5.  그리고 나서 다시 위의 3번에 입력한 명령어를 다시 했고 성공했다.

 

참고 링크

https://stackoverflow.com/questions/59993844/error-loading-local-data-is-disabled-this-must-be-enabled-on-both-the-client 

 

ERROR: Loading local data is disabled - this must be enabled on both the client and server sides

I don't understand the responses that others have provided to similar questions except for the most obvious ones, such as the one below: mysql> SET GLOBAL local_infile=1; Query OK, 0 rows affec...

stackoverflow.com

https://stackoverflow.com/questions/50699458/mysql-load-data-local-infile-on-windows-not-working

 

MySQL LOAD DATA LOCAL INFILE on WINDOWS not WORKING

I am using a windows with MySQL 8.0 installed. I have checked the solutions already posted on stackoverflow but these had no immediate results. I have set the global variable with SET GLOBAL

stackoverflow.com

https://forums.mysql.com/read.php?152,674208,674208

 

MySQL :: LOAD DATA INFILE with Workbench for newbies

LOAD DATA INFILE with Workbench for newbies Posted by: Mike Goodine Date: April 18, 2019 11:52AM I work on a Windows 10 machine and have administrator privileges for that machine. Getting information from a text file into a database is where the work start

forums.mysql.com

https://118k.tistory.com/904

 

[MySQL][Error] Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statem

MySQL 에서 파일의 데이터를 Load할 때 1290 에러가 발생하는 경우가 있습니다. MySQL 8에서는 로컬의 데이터를 입력할 때 보안상의 이유로 지정한 장소의 파일만 업로드가 가능합니다. 에러코드 Error

118k.tistory.com

 

반응형