[ZBX-17562] MySQL 8.0 user creation using native authentication Created: 2020 Apr 07  Updated: 2020 Apr 13

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: 4.0.19, 4.4.7
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Matej Kotras Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MySQL 8



 Description   

When installing server/proxy and creating a user in MySQL 8.0 using existing documentation. Zabbix service returns this error in logfile:

 

13242:20200407:155638.865 [Z3001] connection to database 'zabbix' failed: [2059] Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory   

This is due to MySQL 8 changing their default authentication modules to caching_sha2_password. Users need to be created using old auth method 'mysql_native_password' or MySQL needs to be configured to use the old one as its default

MySQL my.cnf

 

[mysqld]
default-authentication-plugin=mysql_native_password

 

Please update documentation when using MySQL 8 as DB:

 

create database zabbix character set utf8 collate utf8_bin;
create user 'zabbix'@'localhost' identified with mysql_native_password by '<PASSWORD>';
grant all privileges on zabbix.* to 'zabbixuser'@'localhost';

 

and/or support new MySQL authentication method

More info on this topic had been summarized here:
https://medium.com/@crmcmullen/how-to-run-mysql-8-0-with-native-password-authentication-502de5bac661

 



 Comments   
Comment by Matej Kotras [ 2020 Apr 13 ]

typo, should be zabbix instead of zabbixuser
grant all privileges on zabbix.* to 'zabbixuser'@'localhost';

Generated at Sun May 11 07:58:39 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.