We have setup a 4 node cluster. I started the first node using
service mysql bootstrap-pxc and prepopulated our database with some mysql.user values by running:
INSERT INTO `mysql`.`user` VALUES ('localhost', 'user', ... ), ('localhost', 'user2', ...); FLUSH PRIVILEGES;
However, when we bring up nodes 2-4 these permissions are not replicated and I am unable to connect as these users. The only way to connect is to login as our root user on node one, then manually run:
GRANT INSERT,...,DELETE ON dbname.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD 'password';
Then the user is then replicated out to the cluster and I am able to connect.
Is this a bug, or is there something I’m doing wrong? Here is a snippet of our build script that runs this:
service mysql bootstrap-pxc mysql -uroot < /tmp/bootstrap.sql rm /tmp/*.sql