Setup replication and test that it work.
Create ssh tunnel with stunnel.
Test that the tunnel works with:
mysql -u root -h 10.0.0.1 -P 3310 -p
mysql -u root -h 127.0.0.1 -P 3310 -p
This DO NOT work
mysql -u root -h localhost -P 3310 -p
Change master to master_host='10.0.0.1', master_user='xxxx', master_port=3310 ...;
Last IO Error = ... Access denied for user 'xxxx'@'localhost' ...
The problem seems to be that it tries to connect to localhost in stead of the server ip (10.0.0.1).
Localhost is a problem as explained in the article at:
Near the following position:
If we use localhost instead of the IP (192.168.5.45) in the above mysql connect string, we will get an error like:
I believe MariaDB it is trying to use a local socket and not 127.0.01 or 10.0.0.1