Skip to content

Commit

Permalink
fix travis
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Dec 20, 2018
1 parent 3b51a62 commit 60b6dfe
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions .travis/initializedb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,19 @@
set -exv

if [ ! -z "${DB}" ]; then
# disable existing database server in case of accidential connection
sudo service mysql stop

docker pull ${DB}
docker run -it --name=mysqld -d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 ${DB}
sleep 10

mysql() {
docker exec mysqld mysql "${@}"
}
while :
do
sleep 5
mysql -e 'select version()'
if [ $? = 0 ]; then
break
fi
mysql -e 'select version()' && break
echo "server logs"
docker logs --tail 5 mysqld
done

mysql -e 'select VERSION()'

if [ $DB == 'mysql:8.0' ]; then
WITH_PLUGIN='with mysql_native_password'
mysql -e 'SET GLOBAL local_infile=on'
Expand Down

0 comments on commit 60b6dfe

Please sign in to comment.