Jelastic MySQL cluster and db users

380 views Asked by At

I have created a MySQL Cluster using the "Scalable MySQL Cluster with Master-Slave Replication, ProxySQL Load Balancing and Orchestrator" installation instructions. This works as expected.

My Java application can connect to the database using the nodeid endpoint of the Proxysql server and the default user/password emailed during setup.

I have since created another user/password in the MySQL master node with the same permissions as the default user created during setup. However, my Java application gets a "Permission denied" error when trying to use that new user.

If I change the Java application to point directly to the master node instead of the Proxysql node, it works.

Is there another step I must take to enable other db users to be accessed through the Proxysql?

1

There are 1 answers

0
sgi On BEST ANSWER

Yes, you should to enable other db user to be accessed through the proxysql. For enabling a new user please connect to the proxysql node via ssh and execute the next steps:

  • mysql -h 127.0.0.1 -P6032 -uadmin -padmin

  • INSERT INTO mysql_users (username, password, active, default_hostgroup, max_connections) VALUES ('new_user, 'new_user_pass', 1, 10, 1000); for adding new user

  • LOAD MYSQL USERS TO RUNTIME; SAVE MYSQL USERS TO DISK; for loading user to runtime