Skip to content

Commit 7b563b8

Browse files
committed
Fix MariaDB 10.3 installation under Ubuntu 20.04. (#1184)
1 parent 22fce00 commit 7b563b8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- {os: ubuntu-16.04, ruby: 2.4, db: mariadb10.0, allow-failure: true}
3232
# Comment out due to ci/setup.sh stucking.
3333
# - {os: ubuntu-18.04, ruby: 2.4, db: mariadb10.1}
34-
# `service mysql restart` fails.
34+
# Allow failure due to the issue #965, #1165.
3535
- {os: ubuntu-20.04, ruby: 2.4, db: mariadb10.3, allow-failure: true}
3636
- {os: ubuntu-18.04, ruby: 2.4, db: mysql57}
3737
# Allow failure due to the issue #1165.

ci/setup.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,13 @@ fi
7272

7373
# Install MariaDB 10.3 if DB=mariadb10.3
7474
if [[ -n ${GITHUB_ACTIONS-} && -n ${DB-} && x$DB =~ ^xmariadb10.3 ]]; then
75+
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
76+
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
77+
sudo apt-get purge -y 'mysql-common*' 'mysql-client*' 'mysql-server*'
78+
sudo mv /etc/mysql "/etc/mysql-$(date +%Y%m%d-%H%M%S)"
79+
sudo mv /var/lib/mysql "/var/lib/mysql-$(date +%Y%m%d-%H%M%S)"
7580
sudo apt-get install -y -o Dpkg::Options::='--force-confnew' mariadb-server mariadb-server-10.3 libmariadb-dev
76-
CHANGED_PASSWORD=true
81+
CHANGED_PASSWORD_BY_RECREATE=true
7782
fi
7883

7984
# Install MySQL/MariaDB if OS=darwin

0 commit comments

Comments
 (0)