Skip to content

Fix PostgreSQL and MySQL setup on Travis CI #5607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions travis/setup-mysql.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/bash
if [ -n "$ARM64" ]; then
sudo mysql -e 'CREATE USER "travis"@"localhost" IDENTIFIED BY ""'
sudo mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "travis"@"localhost"'
fi
mysql -e "CREATE DATABASE IF NOT EXISTS test"
#!/bin/sh
set -ev

mysql -vvv -e "CREATE DATABASE IF NOT EXISTS test"
12 changes: 7 additions & 5 deletions travis/setup-pgsql.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
echo '
<?php $conn_str .= " user=postgres"; ?>' >> "./ext/pgsql/tests/config.inc"
if [ -z "$ARM64" -o -z "$S390X"]; then
psql -c 'create database test;' -U postgres
#!/bin/sh
set -ev

# PostgreSQL tests currently don't work on some architectures.
if test -z "${ARM64}${S390X}"; then
psql -c "ALTER USER postgres PASSWORD 'postgres';" -U postgres
psql -c "CREATE DATABASE test;" -U postgres
fi