Skip to content

Commit

Permalink
Set mysql root password
Browse files Browse the repository at this point in the history
  • Loading branch information
zds-s committed Feb 27, 2024
1 parent 578c264 commit 314e6bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/hyperf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL
mysql database: 'some_test' # Optional, default value is "test". The specified database which will be create
mysql root password: root
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .travis/setup.mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TRAVIS_BUILD_DIR="${TRAVIS_BUILD_DIR:-$(dirname $(dirname $CURRENT_DIR))}"

echo -e "Create MySQL database..."
mysql -h 127.0.0.1 -u root -e "CREATE DATABASE IF NOT EXISTS mineadmin charset=utf8mb4 collate=utf8mb4_unicode_ci;"
mysql -h 127.0.0.1 -u root -proot -e "CREATE DATABASE IF NOT EXISTS mineadmin charset=utf8mb4 collate=utf8mb4_unicode_ci;"

echo -e "Done\n"

Expand Down
2 changes: 1 addition & 1 deletion config/autoload/databases.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'database' => env('DB_DATABASE', 'hyperf'),
'port' => env('DB_PORT', 3306),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD'),
'password' => env('DB_PASSWORD','root'),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => env('DB_PREFIX', ''),
Expand Down

0 comments on commit 314e6bd

Please sign in to comment.