Nodebalanced MySQL
Thanks in advance!
2 Replies
Also, I shared this question via social media to hopefully bring more eyes. I would love to know the answer to this too.
For my test configuration, I added a MySQL user as follows:
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON . TO 'username'@'localhost' WITH GRANT OPTION;
CREATE USER 'username'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON . TO 'username'@'%' WITH GRANT OPTION;
In my.cnf the bind address set to the respective private IPs.
From there I could connect with:
mysql -u username -h
The only caveat is that sometimes you'll hit one back and sometimes you'll hit the other. I used session stickiness 'none' and Nodebalancer algorithm set to Round Robin to ensure that I was hitting different backends on subsequent attempts.
Feel free to open a ticket with us if you'd like us to take a closer look at your configuration -- we can recap the solution here if needed.