Hi Markus, I got an error. It says "Error : No Master can be determined".
Here's how my config file looks like [maxscale] threads=1 log_trace=1 [srv1] type=server address=localhost port=3306 protocol=MySQLBackend [srv2] type=server address=localhost port=3307 protocol=MySQLBackend [MariaDB10 Monitor] type=monitor module=mysqlmon servers=srv1,srv2 user=maxmon passwd=maxpwd [RW Split Router] type=service router=readwritesplit servers=srv1,srv2 user=maxuser passwd=maxpwd [RW Split Listener] type=listener service=RW Split Router protocol=MySQLClient port=4006 [CLI] type=service router=cli [CLI listener] type=listener service=CLI protocol=maxscaled address=localhost port=6603 I have granted all privileges to "maxmon". Does it help in pin pointing the error? Thanks, Sriram On Tue, Mar 10, 2015 at 1:22 AM, Markus Mäkelä <markus.mak...@mariadb.com> wrote: > Hi, > > The first step would be to inspect the state the servers are in. The > easiest way to do is to use the maxadmin interface. To enable this, > configure the following into MaxScale's config file > > [CLI] > type=service > router=cli > > [CLI Listener] > type=listener > service=CLI > protocol=maxscaled > port=6603 > > Executing the 'show servers' should give you a list of the servers and > their states. If this doesn't give any clues the next step would be to > enable MaxScale's tracelog. The log can be enabled by adding > 'log_trace=1' under the [maxscale] section. Here you can see the routing > logic of the router and the reasons why the queries are routed to the > master. > > Markus > > On Tue, 2015-03-10 at 00:57 +0530, sriram patil wrote: > > 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 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 > > > > > > > > > > _______________________________________________ > > Mailing list: https://launchpad.net/~maria-developers > > Post to : maria-developers@lists.launchpad.net > > Unsubscribe : https://launchpad.net/~maria-developers > > More help : https://help.launchpad.net/ListHelp > > -- > Markus Mäkelä, Software Engineer > MariaDB Corporation > t: +358 40 7740484 | Skype: markus.j.makela > >
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp