hyperf/.travis/setup.mysql.sh

13 lines
412 B
Bash
Raw Normal View History

2019-06-24 16:15:18 +08:00
#!/usr/bin/env bash
CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TRAVIS_BUILD_DIR="${TRAVIS_BUILD_DIR:-$(dirname $(dirname $CURRENT_DIR))}"
echo -e "Create MySQL database..."
2020-10-27 23:36:09 +08:00
mysql -h 127.0.0.1 -u root -e "CREATE DATABASE IF NOT EXISTS hyperf charset=utf8mb4 collate=utf8mb4_unicode_ci;"
cat "${TRAVIS_BUILD_DIR}/.travis/hyperf.sql" | mysql -h 127.0.0.1 -u root hyperf
2019-06-24 16:15:18 +08:00
echo -e "Done\n"
2020-10-27 23:36:09 +08:00
wait