2026년 1월 31일 토요일

Mysql 설치 오류 - 2nd

윈도우11에서 8.0 버전 설치가 안 된다. 정확히 얘기하면 세부 설정(Run MySQL Configurator) 옵션이 보이지 않는다.


9.6 버전 설치 후 인증 방식 변경 시도. 8.0 버전부터 기본 인증 방식이 caching_sha2_password로 바뀌었는데, 애용하는 클라이언트앱 sqlyog이 2005년쯤 버전이라 지원을 안 해서(..)
mysql> select user, host, plugin from mysql.user;
+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session    | localhost | caching_sha2_password |
| mysql.sys        | localhost | caching_sha2_password |
| root             | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+
4 rows in set (0.00 sec)

mysql> alter user 'root'@'localhost' identified with mysql_native_password by '******';
ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded

플러그인 로딩 실패? my.ini에 설정(mysql_native_password=ON) 추가하면 'unknown variable mysql-native-password=ON' 메시지와 함께 서비스 시작이 안 된다. 아예 지원을 안 하는 모양. 어쩐지 세부 설정 때 '호환 모드'가 없더라니.

제미나이한테 물어 보니 8.4 버전까지만 지원한다고 해서 재설치. 해당 버전도 기본 지원은 아니라서 my.ini에 설정을 추가해줘야 한다.
[mysqld]
mysql_native_password=ON
mysql> alter user 'root'@'localhost' identified with mysql_native_password by '******';
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> select user, host, plugin from mysql.user;
+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session    | localhost | caching_sha2_password |
| mysql.sys        | localhost | caching_sha2_password |
| root             | localhost | mysql_native_password |
+------------------+-----------+-----------------------+
4 rows in set (0.00 sec)

이후 접속은 잘 되는데, 이번엔 데이터 임포트 실패. 외부 파일 업로드도 막았구나. 철통보안(..)


다음 설정을 추가해줘야 한다.
[mysqld]
mysql_native_password=ON
local_infile=1

관련 글

댓글 없음:

댓글 쓰기

크리에이티브 커먼즈 라이선스