CI: Create mysql user for the correct host
This commit is contained in:
parent
f369081270
commit
fdcf285588
1 changed files with 12 additions and 5 deletions
17
.github/actions/setup-database/action.yml
vendored
17
.github/actions/setup-database/action.yml
vendored
|
|
@ -48,13 +48,20 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
# Note: MySQL server configuration (character set, collation, row format) is set
|
# Note: MySQL server configuration (character set, collation, row format) is set
|
||||||
# via my-cnf in the shogo82148/actions-setup-mysql action.
|
# via my-cnf in the shogo82148/actions-setup-mysql action.
|
||||||
# The user 'evennia' is already created by the action, but we need to create the database
|
# The user 'evennia' is already created by the action for hosts: localhost, 127.0.0.1, and ::1
|
||||||
# and grant privileges.
|
# We just need to create the database and grant additional privileges.
|
||||||
mysql -u root -proot_password mysql <<EOF
|
mysql -u root -proot_password mysql <<EOF
|
||||||
CREATE DATABASE IF NOT EXISTS evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
CREATE DATABASE IF NOT EXISTS evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
GRANT ALL PRIVILEGES ON \`evennia%\`.* TO 'evennia'@'%';
|
-- Grant privileges to existing user hosts (action creates: localhost, 127.0.0.1, ::1)
|
||||||
GRANT PROCESS ON *.* TO 'evennia'@'%';
|
GRANT ALL PRIVILEGES ON \`evennia%\`.* TO 'evennia'@'localhost';
|
||||||
GRANT SESSION_VARIABLES_ADMIN ON *.* TO 'evennia'@'%';
|
GRANT ALL PRIVILEGES ON \`evennia%\`.* TO 'evennia'@'127.0.0.1';
|
||||||
|
GRANT ALL PRIVILEGES ON \`evennia%\`.* TO 'evennia'@'::1';
|
||||||
|
GRANT PROCESS ON *.* TO 'evennia'@'localhost';
|
||||||
|
GRANT PROCESS ON *.* TO 'evennia'@'127.0.0.1';
|
||||||
|
GRANT PROCESS ON *.* TO 'evennia'@'::1';
|
||||||
|
GRANT SESSION_VARIABLES_ADMIN ON *.* TO 'evennia'@'localhost';
|
||||||
|
GRANT SESSION_VARIABLES_ADMIN ON *.* TO 'evennia'@'127.0.0.1';
|
||||||
|
GRANT SESSION_VARIABLES_ADMIN ON *.* TO 'evennia'@'::1';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
EOF
|
EOF
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue