maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08261
Re: [GSoC'15] Running MaxScale and MariaDB servers on single machine
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@xxxxxxxxxxxxxxxxxxx
> 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
Follow ups
References