Hi,
In order for you to run SQL queries through MaxScale, you need to
configure a service and a listener in MaxScale. I assume you've already
configured the servers and the monitor since you've managed to test out
the automatic failover.
The MaxScale tutorial has a chapter on how to configure a readwritesplit
service
<https://mariadb.com/kb/en/mariadb-maxscale-2402-maxscale-2402-read-write-splitting-with-mariadb-maxscale/>.
You can follow that tutorial to configure a port on which MaxScale
listens for SQL connections. After that, you simply connect to the port
with your normal MariaDB client software and proceed to execute your SQL
queries. The readwritesplit service will take care of figuring out where
the queries must go and send writes to the current master node and load
balance the reads across the slave servers.
Markus
On 3/20/25 02:49, Richard Reina via discuss wrote:
I am experimenting with maxscale and have set up a test cluster with a
master and three slaves. I have successfully tested automatic failover
and everything seems to work fine. However, I will need to run
occasional direct read and write SQL queries which in the past have
done in a non-maxscale/proxy environment by simply logging into the
master and doing select and update queries. Since with Maxscale the
master can change I believe I cannot do that. Can someone tell me how
I can do SQL queries on the maxscale proxy?
How can I get a CLI like:
maxscale> UPDATE contact SET inactive='Y' WHERE ID =923;
_______________________________________________
discuss mailing list [email protected]
To unsubscribe send an email [email protected]
--
Markus Mäkelä, Senior Software Engineer
MariaDB Corporation
_______________________________________________
discuss mailing list -- [email protected]
To unsubscribe send an email to [email protected]