I had a master-slave set up working fine until a power outage on the slave. Now I get
error connecting to master 'repl@10.0.0.1:50000' - retry-time: 60
maximum-retries: 86400
message: Access denied for user 'repl'@'localhost' (using password: YES)
The password has not changed and I can log in to the database using
slave-host$ mysql -h10.0.0.1 -P50000 --user=repl --password='secret'
However once logged in I cannot see any databases except information_schema
. Trying use <my_db_name>
gives an access denied error.
On the master
master-host: mysql> show grants for repl@localhost;
GRANT REPLICATION SLAVE ON *.* TO
'repl'@'localhost' IDENTIFIED BY PASSWORD '*xxxxx'
I've tried re-granting access, FLUSH PRIVILEGES
, START/STOP SLAVE;
in various combinations but I'm not getting anywhere.
Nb. the host at 10.0.0.1 has an SSH tunnel setup to the datbase host, so grants for repl@localhost
are appropriate because the master sees it as local traffic.
Master and slave both on: 10.1.26-MariaDB-0+deb9u1
EDIT
remove replication client
grant - this was a hangover from trying random things and not related. Thanks @RickJames for spotting.