DBZ-7049 Modify the server config instead of the query statement.

This commit is contained in:
Bue-Von-Hun 2024-03-04 10:47:35 +09:00 committed by Jiri Pechanec
parent 3cbc8b3acd
commit 3050bf1381
2 changed files with 7 additions and 13 deletions

View File

@ -6,20 +6,14 @@
-- 2) 'snapper' - all privileges required by the snapshot reader AND binlog reader -- 2) 'snapper' - all privileges required by the snapshot reader AND binlog reader
-- 3) 'mysqluser' - all privileges -- 3) 'mysqluser' - all privileges
-- --
CREATE USER 'replicator'@'%' IDENTIFIED WITH caching_sha2_password BY 'replpass'; CREATE USER 'replicator' IDENTIFIED BY 'replpass';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator'@'%'; GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator';
CREATE USER 'snapper' IDENTIFIED BY 'snapperpass';
CREATE USER 'snapper'@'%' IDENTIFIED WITH caching_sha2_password BY 'snapperpass';
GRANT SELECT, INSERT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'snapper'@'%'; GRANT SELECT, INSERT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'snapper'@'%';
CREATE USER 'cloud' IDENTIFIED BY 'cloudpass';
CREATE USER 'cloud'@'%' IDENTIFIED WITH caching_sha2_password BY 'cloudpass'; GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT, LOCK TABLES ON *.* TO 'cloud'@'%';
GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT, LOCK TABLES ON *.* TO 'cloud'@'%';
ALTER USER 'mysqluser'@'%' IDENTIFIED WITH caching_sha2_password BY 'mysqlpw';
GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%'; GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%';
FLUSH PRIVILEGES;
-- ---------------------------------------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------------------------------------
-- DATABASE: emptydb -- DATABASE: emptydb
-- ---------------------------------------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------------------------------------

View File

@ -58,12 +58,12 @@ expire_logs_days = 1
# This section specifies 8.0 specific configurations # This section specifies 8.0 specific configurations
# -------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------
[mysqld-8.0] [mysqld-8.0]
default_authentication_plugin = mysql_native_password default_authentication_plugin = caching_sha2_password
binlog_expire_logs_seconds = 86400 binlog_expire_logs_seconds = 86400
# -------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------
# This section specifies 8.2 specific configurations # This section specifies 8.2 specific configurations
# -------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------
[mysqld-8.2] [mysqld-8.2]
default_authentication_plugin = mysql_native_password default_authentication_plugin = caching_sha2_password
binlog_expire_logs_seconds = 86400 binlog_expire_logs_seconds = 86400