Configuring your platform

Upgrading MySQL to version 8.0

Tags: 157 views 0

How to upgrade MySQL to version 8.0 or later.

Overview

MySQL 8.0 changes the default authentication plugin, and it contains some breaking changes. Therefore, if you want to upgrade MySQL to version 8.0, make sure you have Atomia CloudHosting Modules version 21.5.* or later.

Using the legacy authentication plugin

MySQL version 8.0 uses authentication plugin caching_sha2_password by default, while the previous versions use mysql_native_password. If you configure MySQL server to use legacy authentication plugin mysql_native_password, for example by setting default_authentication_plugin=mysql_native_password in the /etc/mysql/conf.d/mysqld.cnf, you also need to configure Atomia.

To configure Atomia to use mysql_native_password authentication plugin, you should add AuthenticationPlugin property with value mysql_native_password in the resource description for the MySQL module. For example:

  <bindings>
    <moduleList>
      <module name="Atomia.Provisioning.Modules.MySql.MySql" resourceAsignmentPolicy="DefaultResource" />
    </moduleList>
    <resourceList>
      <resource name="MySQLServer1">
        <property name="DatabaseServer">192.168.33.17</property>
        <property name="PublicIpAddress">192.168.33.17</property>
        <property name="User">mysqladmin</property>
        <property name="Password">mysql123</property>
        <property name="AuthenticationPlugin">mysql_native_password</property>
      </resource>
    </resourceList>
  </bindings>

Was this helpful?