← Back to team overview

maria-developers team mailing list archive

[GSoC'15] Running MaxScale and MariaDB servers on single machine

 

Hi All,

I tried running 2 MariaDB servers and MaxScale on my laptop. I gave
different configurations to both MariaDB servers with separate data and log
directories. Referred this
<http://www.ducea.com/2009/01/19/running-multiple-instances-of-mysql-on-the-same-machine/>
for it.

Also have set up MaxScale from "MaxScale for rest of us" series on MariaDB
blog.
1. https://mariadb.com/blog/maxscale-rest-us-part-1
2. https://mariadb.com/blog/maxscale-rest-us-part-2
3. https://mariadb.com/blog/maxscale-rest-us-part-3
4. https://mariadb.com/blog/maxscale-rest-us-part-4

So, i tried to set up the readwritesplit router with 1 master and 1 slave.
Here, the replication mechanism worked fine but the queries are always
executed on the master server.

Example output for a read query:

mysql -h localhost -u maxuser -p test -e "select c1, @@server_id from t1"

Enter password:
+------+-------------+
| c1   | @@server_id |
+------+-------------+
|    1 |           1 |
+------+-------------+

server_id for master is 1 whereas for slave it is 11, which is never
displayed in the output.

Can someone help me with this? Should I try the same config with one more
slave? Are there any better resources for setting up MaxScale?

Thanks,
Sriram

Follow ups