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
(cherry picked from commit a6960de09a)
This commit is contained in:
Markos Chandras 2017-06-19 10:29:01 +01:00 committed by Yolanda Robla
parent 9f11e613f4
commit 93958b896d
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,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