From a6960de09a112676e92c05282219a72760a5c9dd Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 19 Jun 2017 10:29:01 +0100 Subject: [PATCH] scripts: test-bifrost: Start MySQL service before configuring the DB Fixes the following problem: 2017-06-19 09:21:19.720993 | + mysql_setup 2017-06-19 09:21:19.721006 | + local DB_ROOT_PW=insecure_slave 2017-06-19 09:21:19.721023 | + local DB_USER=openstack_citest 2017-06-19 09:21:19.721045 | + local DB_PW=openstack_citest 2017-06-19 09:21:19.721075 | + sudo -H mysqladmin -u root password insecure_slave 2017-06-19 09:21:19.768612 | mysqladmin: connect to server at 'localhost' failed 2017-06-19 09:18:42.671268 | error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")' 2017-06-19 09:18:42.671317 | Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! Change-Id: I06b9682751a4aefe21866336ed9726541f74b22a --- scripts/test-bifrost.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/test-bifrost.sh b/scripts/test-bifrost.sh index db84d2f33..2b63fe135 100755 --- a/scripts/test-bifrost.sh +++ b/scripts/test-bifrost.sh @@ -56,6 +56,9 @@ mysql_setup() { local DB_USER=openstack_citest local DB_PW=openstack_citest + # Make sure MySQL is running + sudo service mysql start || sudo service mysqld start || sudo service mariadb start + sudo -H mysqladmin -u root password $DB_ROOT_PW # It's best practice to remove anonymous users from the database. If