Although I can connect from slave to master via a command-line mysql client, my slave can't connect to the master as part of its replication task. SHOW SLAVE STATUS
cites a "Permission denied" error:
Last_IO_Error: error connecting to master 'replicant@dbmaster:5000' - retry-time: 60 maximum-retries: 86400 message: Can't connect to MySQL server on 'dbmaster' (13 "Permission denied")
I've checked the user permissions as well as a command-line client connection. What else can I check?
The user has SELECT
and REPLICATION SLAVE
permissions on the master:
mysql -h dbmaster -P 5000 -u replicant "-p$PASS" --ssl -e 'SHOW GRANTS'
# +--------------------------------------------------------------------------------------------------------------------------------------------------------+
# | Grants for [email protected] |
# +--------------------------------------------------------------------------------------------------------------------------------------------------------+
# | GRANT SELECT, REPLICATION SLAVE ON *.* TO `replicant`@`192.168.187.101` IDENTIFIED BY PASSWORD '[HASH-REDACTED]' REQUIRE SSL |
# +--------------------------------------------------------------------------------------------------------------------------------------------------------+
And I've set up the slave to use the same username, password, host, port, ssl:
cat <<-EOF | mysql
STOP SLAVE;
CHANGE MASTER TO MASTER_SSL=1, MASTER_DELAY=259200,
MASTER_HOST='dbmaster', MASTER_PORT=5000,
MASTER_USER='replicant', MASTER_PASSWORD='$PASS',
MASTER_LOG_FILE='mysql-bin.041117', MASTER_LOG_POS=733093730;
START SLAVE;
EOF
The server is running Mariadb 10.3.
STOP SLAVE; CHANGE MASTER TO MASTER_PASSWORD = '...'; START SLAVE;
, but the error is the same, and the slave status showsSlave_IO_Running: Connecting