I had a master-slave set up working fine until a power outage on the slave. Now I get
error connecting to master 'email@example.com:50000' - retry-time: 60
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
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,
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
replication client grant - this was a hangover from trying random things and not related. Thanks @RickJames for spotting.