MariaDB build error with Xenial

I think something may have broken or changed with regards to how MariaDB is configured for Xenial.

Passing from yesterday: https://travis-ci.org/coleifer/peewee/jobs/523551111

Erroring from today: https://travis-ci.org/coleifer/peewee/jobs/524146594

Today the following line from my config is failing (only in Xenial):

mysql -e 'grant all on *.* to travis@localhost;'

ERROR 1133 (28000) at line 1: Can't find any matching row in the user table

Yesterday this line did not produce any issues in either trusty or xenial.

We’re seeing the following errors today after the same builds ran successfully yesterday:

ā€œAccess denied for user ā€˜travis’@ā€˜localhost’ (using password: NO)ā€

As an experiment, I modified my setup script so that the failure of this particular command would not cause the whole build to error. After doing this:

"Access denied for user 'travis'@'localhost' (using password: NO)"

So, if I try to do the GRANT it errors. If I try to omit the GRANT it fails.

1 Like

Please use

for further discussion on this issue.

How is this the same problem or even related?

MariaDB 10.3 seems to be installing just fine on Xenial, from what I can see?

I was able to fix it for us be removing and re-adding the travis user for mariadb.

Thanks @dkliban - that worked for me as well.

Diff of my travis config:

+  - mysql -e 'drop user if exists travis@localhost;'
+  - mysql -e 'create user travis@localhost;'
   - mysql -e 'drop database if exists peewee_test;'
   - mysql -e 'create database peewee_test;'
   - mysql -e 'grant all on *.* to travis@localhost;' || true

Be nice if the travis folks could comment here… this was fairly disruptive and I have no idea how to debug it or even report the issue… now that they’ve closed their fucking issue tracker and force everyone onto here.

1 Like

You can always inspect existing server configuration with things like show grants.

Judging by https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/addons/mariadb.rb#L31 , Travis installs MariaDB with apt-get install -y -o Dpkg::Options::='--force-confnew' mariadb-server mariadb-server-<version>", so its configuration should be whatever dpkg creates by default.

MariaDB 10.4 changes authentication so it does not work on Travis like 10.3 did…

jobs:
  include:
    - addons:
        mariadb: 10.3
    - addons:
        mariadb: 10.4
install: mysql -e "SET Password=PASSWORD('travis')"
script: mysql --version

MariaDB 10.3 works but 10.4 generates:

ERROR 1698 (28000): Access denied for user 'root'@'localhost'
The command "mysql -e "SET Password=PASSWORD('travis')"" failed and exited with 1 during .


Solved by adding sudo to the install command.