diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 075f552..a2df9ac 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -120,8 +120,15 @@ for i in $(seq 10); do echo "Waiting connections... ${i}" done +# Reset password for the root user due to MariaDB 10.4 authentication change. +# See https://mariadb.com/kb/en/authentication-from-mariadb-104/#altering-the-user-account-to-revert-to-the-previous-authentication-method +mysql -u ${MYSQL_TEST_USER} \ + -e "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('')" \ + -S "${MYSQL_TEST_SOCKET}" \ + -P "${MYSQL_TEST_PORT}" + # See https://github.com/brianmario/mysql2/blob/master/.travis_setup.sh -mysql -u $MYSQL_TEST_USER \ +mysql -u root \ -e 'CREATE DATABASE /*M!50701 IF NOT EXISTS */ test' \ -S "${MYSQL_TEST_SOCKET}" \ -P "${MYSQL_TEST_PORT}" @@ -130,7 +137,7 @@ mysql -u $MYSQL_TEST_USER \ cat < spec/configuration.yml root: host: localhost - username: ${MYSQL_TEST_USER} + username: root password: database: test port: ${MYSQL_TEST_PORT}