diff options
author | ben smith <polynomial@users.noreply.github.com> | 2016-07-22 15:37:05 -0700 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2016-07-23 00:37:05 +0200 |
commit | c38e6a2a6060434d842f173ebe5a4a7d4d99781a (patch) | |
tree | cd90903c64af83649703d81595f929b10605c5e1 /nixos/modules/services/databases | |
parent | e8343fbb3882e932d23af6141d00a195528cc0b0 (diff) | |
download | nixlib-c38e6a2a6060434d842f173ebe5a4a7d4d99781a.tar nixlib-c38e6a2a6060434d842f173ebe5a4a7d4d99781a.tar.gz nixlib-c38e6a2a6060434d842f173ebe5a4a7d4d99781a.tar.bz2 nixlib-c38e6a2a6060434d842f173ebe5a4a7d4d99781a.tar.lz nixlib-c38e6a2a6060434d842f173ebe5a4a7d4d99781a.tar.xz nixlib-c38e6a2a6060434d842f173ebe5a4a7d4d99781a.tar.zst nixlib-c38e6a2a6060434d842f173ebe5a4a7d4d99781a.zip |
mysql: fix replication tests (#17174)
Eliminate race condition in replication test Remove replication configuration from standalone test Improve mysql command syntax consistency
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r-- | nixos/modules/services/databases/mysql.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index 60c6b22e0595..0b2f99f8fff1 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -240,8 +240,9 @@ in # Set up the replication master ( echo "use mysql;" + echo "CREATE USER '${cfg.replication.masterUser}'@'${cfg.replication.slaveHost}' IDENTIFIED WITH mysql_native_password;" + echo "SET PASSWORD FOR '${cfg.replication.masterUser}'@'${cfg.replication.slaveHost}' = PASSWORD('${cfg.replication.masterPassword}');" echo "GRANT REPLICATION SLAVE ON *.* TO '${cfg.replication.masterUser}'@'${cfg.replication.slaveHost}';" - echo "update user set Password=password('${cfg.replication.masterPassword}') where User='${cfg.replication.masterUser}';" ) | ${mysql}/bin/mysql -u root -N ''} |