[MySQL] mysqld: Can't open shared library

728x90

문제

mysqld 명령 실행 시 아래와 같은 에러 발생

mysqld: Can't open shared library '/engn001/mysql-commercial-8.0.36-linux-glibc2.28-x86_64/lib64/mysql/plugin/component_reference_cache.so' (errno: 2 /engn001/mysql-commercial-8.0.36-linux-glibc2.28-x86_64/lib64/mysql/plugin/component_reference_cache.so: cannot open shared obje)
mysqld: Cannot load component from specified URN: 'file://component_reference_cache'.

 

component_reference_cache.so 라이브러리를 못 찾는다는 내용인데

에러 메세지의 해당 경로는 잘못된 경로를 바라보고 있음

(실제로는 /engn001/mysql-commercial-8.0.36-linux-glibc2.28-x86_64/lib/plugin/component_reference_cache.so 에 있었음)

 

원인

mysqld 명령을 실행하면 라이브러리를 찾는 디폴트 경로가 있는 것으로 보임

 

해결방안

my.cnf 파일에 plugin_dir 파라미터를 통해 라이브러리 경로를 수동으로 명시

# vi /etc/my.cnf

[mysqld]
plugin_dir                      = /engn001/mysql-commercial-8.0.36-linux-glibc2.28-x86_64/lib/plugin

 

728x90