Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17562

MySQL 8.0 user creation using native authentication

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 4.0.19, 4.4.7
    • Documentation (D)
    • None
    • MySQL 8

      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

       

            zabbix.dev Zabbix Development Team
            mkotras Matej Kotras
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: