Re: slave to master

2016-04-30 Thread william drescher

On 4/30/2016 3:22 AM, Thomas wrote:

Am Freitag, 29. April 2016, 14:49:57 schrieb william drescher:

On 4/28/2016 5:20 PM, Thomas wrote:

Hi,

I have setup an master slave replication.
This works fine.
I have running an Apache webserver and some other programms accessing the
master.
Whats the standard pocedure if master fail?





When the master is repaired and up you need to stop the programs
on the slave from accessing mysql (ie: stop the programs on the
slave), make a database copy of the slave, copy it to the master
and reload the database on the master, and then use the Change
Master to command on the slave to set up the slave to begin
replicating and start slave.

This is the poor man's failover for low volume systems.
In essence the slave becomes the main database server until you
are ready to restart the master and replication.


Hi thanks for all the answers,
I only want that when master fails the slave will be the new master and do
everythink that the master has before done. So I have more time to repair the
master.
I have to change the slave to master because I need write access to the mySQL
databases.

Sure that when mySQL data on the master are damaged I will have same problems
on the slave, but for this I have an undependent data saving, not realtime but
acceptable. Sure I need in this case more time to repair the whole system.

slave to master:
Like this:
https://dev.mysql.com/doc/refman/5.5/en/replication-solutions-switch.html

Is this the way to go?

thanks
Thomas




yes


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: slave to master

2016-04-30 Thread Thomas
Am Freitag, 29. April 2016, 14:49:57 schrieb william drescher:
> On 4/28/2016 5:20 PM, Thomas wrote:
> > Hi,
> > 
> > I have setup an master slave replication.
> > This works fine.
> > I have running an Apache webserver and some other programms accessing the
> > master.
> > Whats the standard pocedure if master fail?
> > 

> 
> When the master is repaired and up you need to stop the programs
> on the slave from accessing mysql (ie: stop the programs on the
> slave), make a database copy of the slave, copy it to the master
> and reload the database on the master, and then use the Change
> Master to command on the slave to set up the slave to begin
> replicating and start slave.
> 
> This is the poor man's failover for low volume systems.
> In essence the slave becomes the main database server until you
> are ready to restart the master and replication.

Hi thanks for all the answers,
I only want that when master fails the slave will be the new master and do 
everythink that the master has before done. So I have more time to repair the 
master.
I have to change the slave to master because I need write access to the mySQL 
databases.

Sure that when mySQL data on the master are damaged I will have same problems 
on the slave, but for this I have an undependent data saving, not realtime but 
acceptable. Sure I need in this case more time to repair the whole system.

slave to master:
Like this:
https://dev.mysql.com/doc/refman/5.5/en/replication-solutions-switch.html

Is this the way to go?

thanks 
Thomas



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: slave to master

2016-04-29 Thread Reindl Harald



Am 29.04.2016 um 20:49 schrieb william drescher:

On 4/28/2016 5:20 PM, Thomas wrote:

Hi,

I have setup an master slave replication.
This works fine.
I have running an Apache webserver and some other programms accessing the
master.
Whats the standard pocedure if master fail?

I want to start up the programms on the slave by hand and then they are
accessing the mySQL slave. Can they write to the slave or do I have to
change
something before in the mysql slave configuration?

The simple answer is that you don't have to do anything.

At some point you will want to stop the slave so that it will not start
replicating when the master comes back up.


it won't

frankly crash the master and replication will break and stop after 
reboot in most cases - no way that it just starts again just because the 
master comes back later


hence you normally have "read-only" on your slaves to prevent breaking 
replication




signature.asc
Description: OpenPGP digital signature


Re: slave to master

2016-04-29 Thread Reindl Harald
ould
work
with any mysql-compatible protoco.

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com
<mailto:mahmoud.alshin...@gmail.com>
<mailto:mahmoud.alshin...@gmail.com
<mailto:mahmoud.alshin...@gmail.com>>
tux...@fedoraproject.org
<mailto:tux...@fedoraproject.org>
<mailto:tux...@fedoraproject.org <mailto:tux...@fedoraproject.org>>

On Fri, Apr 29, 2016 at 3:13 PM, Reindl Harald
<h.rei...@thelounge.net <mailto:h.rei...@thelounge.net>
<mailto:h.rei...@thelounge.net <mailto:h.rei...@thelounge.net>>>
wrote:


Am 29.04.2016 um 15:07 schrieb Johan De Meersman:

From: "Mahmoud Alshinhab"
<mahmoud.alshin...@gmail.com
    <mailto:mahmoud.alshin...@gmail.com>
<mailto:mahmoud.alshin...@gmail.com
<mailto:mahmoud.alshin...@gmail.com>>>
Subject: Re: slave to master


I think you should have a look at MariaDB
Connector[1].


It provides Load balancing and failover as
Failover
occurs when a connection to
a primary database server fails and the
connector
will open up a connection to
another database server.


Hmm, I didn't know that they built that into it,
interesting. Does it require server features, or
would
it work with any mysql-compatible protocol ?

Load balancing allows load (read and write)
to be
distributed over multiple
servers.


Is read-write splitting also built-in, then?


here you go:
https://mariadb.com/de/products/mariadb-maxscale and
forget
about "MariaDB Connector" whatever that is





signature.asc
Description: OpenPGP digital signature


Re: slave to master

2016-04-29 Thread Mahmoud Alshinhab
I was think of it from the cloud prospective, as for example you can
guarantee that Amazon's Elastic Load Balancer won't be a single point of
failure, so I was thinking how can I use MariaDB MaxScale and in the same
time guarantee that it won't be a single point of failure.

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com
tux...@fedoraproject.org

On Fri, Apr 29, 2016 at 5:34 PM, Reindl Harald <h.rei...@thelounge.net>
wrote:

>
>
> Am 29.04.2016 um 17:27 schrieb Mahmoud Alshinhab:
>
>> I also like the MariaDB Max scale that Reindl Harald Sent -Thanks-
>> However I don't know if it is possible to use 2 servers of the max scale
>> with a load balancer in front of them or not.
>> I always try to avoid the Single Point of Failure
>>
>
> get rid of the idea that your "load-balancer" not a single point
>
> in a sane environment there is no single point of failure because max
> scale *is the load balancer* and typically runs on a HA cluster where it
> never goes away (virtual machine on a cluster FS - as example - VMware
> vSphere with two hosts and VMware HA enabled)
>
> why do you want a load balancer in front of a load balancer and how do you
> make sure that this load balancer is redundant and not a single point of
> failure itself?
>
> "https://mariadb.com/products/mariadb-maxscale/how-maxscale-works;
>> On Fri, Apr 29, 2016 at 5:20 PM, Mahmoud Alshinhab
>> <mahmoud.alshin...@gmail.com <mailto:mahmoud.alshin...@gmail.com>> wrote:
>>
>> I quote this from the page[1]:
>>
>>
>>   Load balancing implementation
>>
>>
>> Random picking
>>
>> When initializing a connection or after a failed connection, the
>> connector will attempt to connect to a host with a certain role
>> (slave/master). The connection is selected randomly among the valid
>> hosts. Thereafter, all statements will run on that database server
>> until the connection will be closed (or fails).
>>
>> The load-balancing will includes a pooling mechanism. Example: when
>> creating a pool of 60 connections, each one will use a random host.
>> With 3 master hosts, the pool will have about 20 connections to each
>> host.
>>
>>
>> Master/slave distributed load
>>
>> For a cluster composed of masters and slaves on connection
>> initialization, there will be 2 underlying connections: one with a
>> master host, another with a slave host. Only one connection is used
>> at a time.
>> For a cluster composed of master hosts only, each connection has
>> only one underlying connection.
>> The load will be distributed due to the random distribution of
>> connections..
>>
>>
>> Master/slave connection selection
>>
>> It’s the application that has to decide to use master or slave
>> connection (the master connection is set by default).
>> Switching the type of connection is done by using JDBC
>> connection.setReadOnly(boolean readOnly)
>> <
>> http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#setReadOnly%28boolean%29
>> >
>> method. Setting read-only to true will use the slave connection,
>> false, the master connection.
>>
>> [1]
>>
>> https://mariadb.com/kb/en/mariadb/failover-and-high-availability-with-mariadb-connector-j/
>>
>> So I think it is not implemented yet. as "the application has to
>> decide to use master or slave connection (the master connection is
>> set by default)."
>>
>> --
>> Eng. Mahmoud Alshinhab
>> AWS Cloud Support Engineer
>> Fedora Ambassador
>> Wiki : https://fedoraproject.org/wiki/User:Tuxawy
>> mahmoud.alshin...@gmail.com <mailto:mahmoud.alshin...@gmail.com>
>> tux...@fedoraproject.org <mailto:tux...@fedoraproject.org>
>>
>> On Fri, Apr 29, 2016 at 5:14 PM, Mahmoud Alshinhab
>> <mahmoud.alshin...@gmail.com <mailto:mahmoud.alshin...@gmail.com>>
>> wrote:
>>
>> It was actually built for Amazon's Aurora, but it should work
>> with any mysql-compatible protoco.
>>
>> --
>> Eng. Mahmoud Alshinhab
>> AWS Cloud Support Engineer
>> Fedora Ambassador
>>     Wiki : https://fedoraproject.org/wiki/User:Tuxawy
>> mahmoud.alshin...@gmail.com <ma

Re: slave to master

2016-04-29 Thread william drescher

On 4/28/2016 5:20 PM, Thomas wrote:

Hi,

I have setup an master slave replication.
This works fine.
I have running an Apache webserver and some other programms accessing the
master.
Whats the standard pocedure if master fail?

I want to start up the programms on the slave by hand and then they are
accessing the mySQL slave. Can they write to the slave or do I have to change
something before in the mysql slave configuration?


thanks
Thomas

The simple answer is that you don't have to do anything.
At some point you will want to stop the slave so that it will not 
start replicating when the master comes back up.


When the master is repaired and up you need to stop the programs 
on the slave from accessing mysql (ie: stop the programs on the 
slave), make a database copy of the slave, copy it to the master 
and reload the database on the master, and then use the Change 
Master to command on the slave to set up the slave to begin 
replicating and start slave.


This is the poor man's failover for low volume systems.
In essence the slave becomes the main database server until you 
are ready to restart the master and replication.


bill



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: slave to master

2016-04-29 Thread Reindl Harald



Am 29.04.2016 um 17:27 schrieb Mahmoud Alshinhab:

I also like the MariaDB Max scale that Reindl Harald Sent -Thanks-
However I don't know if it is possible to use 2 servers of the max scale
with a load balancer in front of them or not.
I always try to avoid the Single Point of Failure


get rid of the idea that your "load-balancer" not a single point

in a sane environment there is no single point of failure because max 
scale *is the load balancer* and typically runs on a HA cluster where it 
never goes away (virtual machine on a cluster FS - as example - VMware 
vSphere with two hosts and VMware HA enabled)


why do you want a load balancer in front of a load balancer and how do 
you make sure that this load balancer is redundant and not a single 
point of failure itself?



"https://mariadb.com/products/mariadb-maxscale/how-maxscale-works;
On Fri, Apr 29, 2016 at 5:20 PM, Mahmoud Alshinhab
<mahmoud.alshin...@gmail.com <mailto:mahmoud.alshin...@gmail.com>> wrote:

I quote this from the page[1]:


  Load balancing implementation


Random picking

When initializing a connection or after a failed connection, the
connector will attempt to connect to a host with a certain role
(slave/master). The connection is selected randomly among the valid
hosts. Thereafter, all statements will run on that database server
until the connection will be closed (or fails).

The load-balancing will includes a pooling mechanism. Example: when
creating a pool of 60 connections, each one will use a random host.
With 3 master hosts, the pool will have about 20 connections to each
host.


Master/slave distributed load

For a cluster composed of masters and slaves on connection
initialization, there will be 2 underlying connections: one with a
master host, another with a slave host. Only one connection is used
at a time.
For a cluster composed of master hosts only, each connection has
only one underlying connection.
The load will be distributed due to the random distribution of
connections..


Master/slave connection selection

It’s the application that has to decide to use master or slave
connection (the master connection is set by default).
Switching the type of connection is done by using JDBC
connection.setReadOnly(boolean readOnly)

<http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#setReadOnly%28boolean%29>
method. Setting read-only to true will use the slave connection,
false, the master connection.

[1]

https://mariadb.com/kb/en/mariadb/failover-and-high-availability-with-mariadb-connector-j/

So I think it is not implemented yet. as "the application has to
decide to use master or slave connection (the master connection is
set by default)."

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com <mailto:mahmoud.alshin...@gmail.com>
tux...@fedoraproject.org <mailto:tux...@fedoraproject.org>

On Fri, Apr 29, 2016 at 5:14 PM, Mahmoud Alshinhab
<mahmoud.alshin...@gmail.com <mailto:mahmoud.alshin...@gmail.com>>
wrote:

It was actually built for Amazon's Aurora, but it should work
with any mysql-compatible protoco.

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com <mailto:mahmoud.alshin...@gmail.com>
tux...@fedoraproject.org <mailto:tux...@fedoraproject.org>

On Fri, Apr 29, 2016 at 3:13 PM, Reindl Harald
<h.rei...@thelounge.net <mailto:h.rei...@thelounge.net>> wrote:


Am 29.04.2016 um 15:07 schrieb Johan De Meersman:

From: "Mahmoud Alshinhab"
<mahmoud.alshin...@gmail.com
    <mailto:mahmoud.alshin...@gmail.com>>
Subject: Re: slave to master


I think you should have a look at MariaDB Connector[1].


It provides Load balancing and failover as Failover
occurs when a connection to
a primary database server fails and the connector
will open up a connection to
another database server.


Hmm, I didn't know that they built that into it,
interesting. Does it require server features, or would
it work with any mysql-compatible protocol ?

Load balancing allows load (read and write) to be
distributed over multiple
servers.


Is read-write splitting also built-in, then?


here you go:
 

Re: slave to master

2016-04-29 Thread Mahmoud Alshinhab
I also like the MariaDB Max scale that Reindl Harald Sent -Thanks- However
I don't know if it is possible to use 2 servers of the max scale with a
load balancer in front of them or not.
I always try to avoid the Single Point of Failure.

"https://mariadb.com/products/mariadb-maxscale/how-maxscale-works;

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com
tux...@fedoraproject.org

On Fri, Apr 29, 2016 at 5:20 PM, Mahmoud Alshinhab <
mahmoud.alshin...@gmail.com> wrote:

> I quote this from the page[1]:
> Load balancing implementation Random picking
>
> When initializing a connection or after a failed connection, the connector
> will attempt to connect to a host with a certain role (slave/master). The
> connection is selected randomly among the valid hosts. Thereafter, all
> statements will run on that database server until the connection will be
> closed (or fails).
>
> The load-balancing will includes a pooling mechanism. Example: when
> creating a pool of 60 connections, each one will use a random host. With 3
> master hosts, the pool will have about 20 connections to each host.
> Master/slave distributed load
>
> For a cluster composed of masters and slaves on connection initialization,
> there will be 2 underlying connections: one with a master host, another
> with a slave host. Only one connection is used at a time.
> For a cluster composed of master hosts only, each connection has only one
> underlying connection.
> The load will be distributed due to the random distribution of
> connections..
> Master/slave connection selection It’s the application that has to decide
> to use master or slave connection (the master connection is set by default).
> Switching the type of connection is done by using JDBC 
> connection.setReadOnly(boolean
> readOnly)
> <http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#setReadOnly%28boolean%29>
> method. Setting read-only to true will use the slave connection, false, the
> master connection.
>
> [1]
> https://mariadb.com/kb/en/mariadb/failover-and-high-availability-with-mariadb-connector-j/
>
> So I think it is not implemented yet. as "the application has to decide to
> use master or slave connection (the master connection is set by default)."
>
> --
> Eng. Mahmoud Alshinhab
> AWS Cloud Support Engineer
> Fedora Ambassador
> Wiki : https://fedoraproject.org/wiki/User:Tuxawy
> mahmoud.alshin...@gmail.com
> tux...@fedoraproject.org
>
> On Fri, Apr 29, 2016 at 5:14 PM, Mahmoud Alshinhab <
> mahmoud.alshin...@gmail.com> wrote:
>
>> It was actually built for Amazon's Aurora, but it should work with any
>> mysql-compatible protoco.
>>
>> --
>> Eng. Mahmoud Alshinhab
>> AWS Cloud Support Engineer
>> Fedora Ambassador
>> Wiki : https://fedoraproject.org/wiki/User:Tuxawy
>> mahmoud.alshin...@gmail.com
>> tux...@fedoraproject.org
>>
>> On Fri, Apr 29, 2016 at 3:13 PM, Reindl Harald <h.rei...@thelounge.net>
>> wrote:
>>
>>>
>>> Am 29.04.2016 um 15:07 schrieb Johan De Meersman:
>>>
>>>> From: "Mahmoud Alshinhab" <mahmoud.alshin...@gmail.com>
>>>>> Subject: Re: slave to master
>>>>>
>>>>
>>>> I think you should have a look at MariaDB Connector[1].
>>>>>
>>>>
>>>> It provides Load balancing and failover as Failover occurs when a
>>>>> connection to
>>>>> a primary database server fails and the connector will open up a
>>>>> connection to
>>>>> another database server.
>>>>>
>>>>
>>>> Hmm, I didn't know that they built that into it, interesting. Does it
>>>> require server features, or would it work with any mysql-compatible
>>>> protocol ?
>>>>
>>>> Load balancing allows load (read and write) to be distributed over
>>>>> multiple
>>>>> servers.
>>>>>
>>>>
>>>> Is read-write splitting also built-in, then?
>>>>
>>>
>>> here you go: https://mariadb.com/de/products/mariadb-maxscale and
>>> forget about "MariaDB Connector" whatever that is
>>>
>>>
>>
>


Re: slave to master

2016-04-29 Thread Reindl Harald



Am 29.04.2016 um 17:20 schrieb Mahmoud Alshinhab:

Master/slave connection selection

It’s the application that has to decide to use master or slave
connection (the master connection is set by default).
Switching the type of connection is done by using JDBC
connection.setReadOnly(boolean readOnly)

method. Setting read-only to true will use the slave connection, false,
the master connection.

[1]
https://mariadb.com/kb/en/mariadb/failover-and-high-availability-with-mariadb-connector-j/

So I think it is not implemented yet. as "the application has to decide
to use master or slave connection (the master connection is set by
default)."


so what's the benfit to use it?

https://mariadb.com/products/mariadb-maxscale/database-scaling

* Replication aware dynamic routing
* Query load balancing
* Client to database connection multiplexing

https://mariadb.com/products/mariadb-maxscale/minimize-maintenance-downtime

Whether you need to take a database node of a cluster out of service for 
maintenance or add a database node back to cluster, MaxScale?s load 
balance routing and monitoring plugins will assure that database traffic 
is always routed to database nodes in service without impacting the 
applications.


https://mariadb.com/products/mariadb-maxscale

MariaDB MaxScale is designed to hide the database setup complexity from 
the application so that the app still believes it connects to a single 
database instance but actually it connects to MariaDB MaxScale which 
sits on top of a growing MariaDB or MySQL database farm.


The concept of a data-centric proxy isn?t new, but MariaDB MaxScale is 
different because it leverages the deep server and parser knowledge of 
MariaDB to ensure that queries are processed in the exactly the same way 
inside MariaDB server. This makes it faster, more efficient and more 
transparent than any other database proxy on the market.




signature.asc
Description: OpenPGP digital signature


Re: slave to master

2016-04-29 Thread Mahmoud Alshinhab
I quote this from the page[1]:
Load balancing implementation Random picking

When initializing a connection or after a failed connection, the connector
will attempt to connect to a host with a certain role (slave/master). The
connection is selected randomly among the valid hosts. Thereafter, all
statements will run on that database server until the connection will be
closed (or fails).

The load-balancing will includes a pooling mechanism. Example: when
creating a pool of 60 connections, each one will use a random host. With 3
master hosts, the pool will have about 20 connections to each host.
Master/slave distributed load

For a cluster composed of masters and slaves on connection initialization,
there will be 2 underlying connections: one with a master host, another
with a slave host. Only one connection is used at a time.
For a cluster composed of master hosts only, each connection has only one
underlying connection.
The load will be distributed due to the random distribution of connections..
Master/slave connection selection It’s the application that has to decide
to use master or slave connection (the master connection is set by default).
Switching the type of connection is done by using JDBC
connection.setReadOnly(boolean
readOnly)
<http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#setReadOnly%28boolean%29>
method. Setting read-only to true will use the slave connection, false, the
master connection.

[1]
https://mariadb.com/kb/en/mariadb/failover-and-high-availability-with-mariadb-connector-j/

So I think it is not implemented yet. as "the application has to decide to
use master or slave connection (the master connection is set by default)."

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com
tux...@fedoraproject.org

On Fri, Apr 29, 2016 at 5:14 PM, Mahmoud Alshinhab <
mahmoud.alshin...@gmail.com> wrote:

> It was actually built for Amazon's Aurora, but it should work with any
> mysql-compatible protoco.
>
> --
> Eng. Mahmoud Alshinhab
> AWS Cloud Support Engineer
> Fedora Ambassador
> Wiki : https://fedoraproject.org/wiki/User:Tuxawy
> mahmoud.alshin...@gmail.com
> tux...@fedoraproject.org
>
> On Fri, Apr 29, 2016 at 3:13 PM, Reindl Harald <h.rei...@thelounge.net>
> wrote:
>
>>
>> Am 29.04.2016 um 15:07 schrieb Johan De Meersman:
>>
>>> From: "Mahmoud Alshinhab" <mahmoud.alshin...@gmail.com>
>>>> Subject: Re: slave to master
>>>>
>>>
>>> I think you should have a look at MariaDB Connector[1].
>>>>
>>>
>>> It provides Load balancing and failover as Failover occurs when a
>>>> connection to
>>>> a primary database server fails and the connector will open up a
>>>> connection to
>>>> another database server.
>>>>
>>>
>>> Hmm, I didn't know that they built that into it, interesting. Does it
>>> require server features, or would it work with any mysql-compatible
>>> protocol ?
>>>
>>> Load balancing allows load (read and write) to be distributed over
>>>> multiple
>>>> servers.
>>>>
>>>
>>> Is read-write splitting also built-in, then?
>>>
>>
>> here you go: https://mariadb.com/de/products/mariadb-maxscale and forget
>> about "MariaDB Connector" whatever that is
>>
>>
>


Re: slave to master

2016-04-29 Thread Mahmoud Alshinhab
It was actually built for Amazon's Aurora, but it should work with any
mysql-compatible protoco.

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com
tux...@fedoraproject.org

On Fri, Apr 29, 2016 at 3:13 PM, Reindl Harald <h.rei...@thelounge.net>
wrote:

>
> Am 29.04.2016 um 15:07 schrieb Johan De Meersman:
>
>> From: "Mahmoud Alshinhab" <mahmoud.alshin...@gmail.com>
>>> Subject: Re: slave to master
>>>
>>
>> I think you should have a look at MariaDB Connector[1].
>>>
>>
>> It provides Load balancing and failover as Failover occurs when a
>>> connection to
>>> a primary database server fails and the connector will open up a
>>> connection to
>>> another database server.
>>>
>>
>> Hmm, I didn't know that they built that into it, interesting. Does it
>> require server features, or would it work with any mysql-compatible
>> protocol ?
>>
>> Load balancing allows load (read and write) to be distributed over
>>> multiple
>>> servers.
>>>
>>
>> Is read-write splitting also built-in, then?
>>
>
> here you go: https://mariadb.com/de/products/mariadb-maxscale and forget
> about "MariaDB Connector" whatever that is
>
>


Re: slave to master

2016-04-29 Thread Reindl Harald


Am 29.04.2016 um 15:07 schrieb Johan De Meersman:

From: "Mahmoud Alshinhab" <mahmoud.alshin...@gmail.com>
Subject: Re: slave to master



I think you should have a look at MariaDB Connector[1].



It provides Load balancing and failover as Failover occurs when a connection to
a primary database server fails and the connector will open up a connection to
another database server.


Hmm, I didn't know that they built that into it, interesting. Does it require 
server features, or would it work with any mysql-compatible protocol ?


Load balancing allows load (read and write) to be distributed over multiple
servers.


Is read-write splitting also built-in, then?


here you go: https://mariadb.com/de/products/mariadb-maxscale and forget 
about "MariaDB Connector" whatever that is




signature.asc
Description: OpenPGP digital signature


Re: slave to master

2016-04-29 Thread Johan De Meersman
> From: "Mahmoud Alshinhab" <mahmoud.alshin...@gmail.com>
> Subject: Re: slave to master

> I think you should have a look at MariaDB Connector[1].

> It provides Load balancing and failover as Failover occurs when a connection 
> to
> a primary database server fails and the connector will open up a connection to
> another database server.

Hmm, I didn't know that they built that into it, interesting. Does it require 
server features, or would it work with any mysql-compatible protocol ? 

> Load balancing allows load (read and write) to be distributed over multiple
> servers.

Is read-write splitting also built-in, then? 

-- 
Unhappiness is discouraged and will be corrected with kitten pictures. 


Re: slave to master

2016-04-29 Thread Mahmoud Alshinhab
Hi,

I think you should have a look at MariaDB Connector[1].

It provides Load balancing and failover as Failover occurs when a
connection to a primary database server fails and the connector will open
up a connection to another database server.

For example, server A has the current connection. After a failure (server
crash, network down …) the connection will switch to another server (B).
Load balancing allows load (read and write) to be distributed over multiple
servers.

I hope this will help you.

[References]
[1]
https://mariadb.com/kb/en/mariadb/failover-and-high-availability-with-mariadb-connector-j/

--
Eng. Mahmoud Alshinhab
AWS Cloud Support Engineer
Fedora Ambassador
Wiki : https://fedoraproject.org/wiki/User:Tuxawy
mahmoud.alshin...@gmail.com
tux...@fedoraproject.org

On Fri, Apr 29, 2016 at 11:03 AM, Johan De Meersman <vegiv...@tuxera.be>
wrote:

> - Original Message -
> > From: "Jason Mallory" <jason.mall...@iridium.com>
> > Subject: RE: slave to master
> >
> > Master-master with load balancer would be best
>
> That's a bit brief, isn't it? :-)
>
> It's more than worth pointing out that your loadbalancer should not
> actually be loadbalancing the connections; master-master replication
> doesn't quite work the way you think it does in most scenarios.
>
> You only want the loadbalancer for the automated failover; but it should
> never send requests to more than one master at any given time. Have it send
> everything to your primary master only; and when that host fails, have it
> send everything to the secondary master only, and never fail back
> automatically.
>
> It's also worth noting that master-master is still not an officially
> supported replication topology. Regular master-slave also works fine with
> the above loadbalancer configuration; in that case you'll just treat the
> slave as the new primary after failover; and will manually reconfigure the
> broken master to be a slave (and adapt the loadbalancer config accordingly)
> as repair.
>
> There does exist software that can do those reconfigurations by itself,
> MMM is one such example.
>
> /Johan
>
> --
> Unhappiness is discouraged and will be corrected with kitten pictures.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
>
>


Re: slave to master

2016-04-29 Thread Johan De Meersman
- Original Message -
> From: "Jason Mallory" <jason.mall...@iridium.com>
> Subject: RE: slave to master
>
> Master-master with load balancer would be best

That's a bit brief, isn't it? :-)

It's more than worth pointing out that your loadbalancer should not actually be 
loadbalancing the connections; master-master replication doesn't quite work the 
way you think it does in most scenarios.

You only want the loadbalancer for the automated failover; but it should never 
send requests to more than one master at any given time. Have it send 
everything to your primary master only; and when that host fails, have it send 
everything to the secondary master only, and never fail back automatically.

It's also worth noting that master-master is still not an officially supported 
replication topology. Regular master-slave also works fine with the above 
loadbalancer configuration; in that case you'll just treat the slave as the new 
primary after failover; and will manually reconfigure the broken master to be a 
slave (and adapt the loadbalancer config accordingly) as repair.

There does exist software that can do those reconfigurations by itself, MMM is 
one such example.

/Johan

-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



RE: slave to master

2016-04-28 Thread Jason Mallory
Master-master with load balancer would be best



Jason Mallory, MySQL/SQL Server DBA

p: +1.480.752.1198 | m: +1.480.823.7771 | f: +1. 480.752.1105  |  
www.iridium.com

The information contained in this email is strictly confidential and may be 
legally privileged and protected from disclosure by law. This email is intended 
for use by the addressee only. Notice is hereby given that any disclosure, use 
or copying of the information by anyone other than the intended recipient is 
strictly prohibited and may be illegal. If you have received this email in 
error, please destroy all electronic and other copies of this message and 
contact the sender or Iridium at em...@iridium.com



-Original Message-
From: Thomas [mailto:thomasit...@gmail.com] 
Sent: Thursday, April 28, 2016 2:21 PM
To: mysql@lists.mysql.com
Subject: slave to master

Hi,

I have setup an master slave replication.
This works fine.
I have running an Apache webserver and some other programms accessing the 
master.
Whats the standard pocedure if master fail?

I want to start up the programms on the slave by hand and then they are 
accessing the mySQL slave. Can they write to the slave or do I have to change 
something before in the mysql slave configuration?


thanks
Thomas





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: slave backups master data

2007-07-16 Thread Eric Bergen

Hi Ofer,

I prefer to use mylvmbackup and lvm to backup mysql. It's snapshot
includes a copy of the relay-log.info file which has the
exec_master_log_pos and relay_master_log_file. These allow you to use
the snapshot to restore another slave. It's also much faster to take a
snapshot of the file system than it is to run mysqldump especially on
large datasets.

-Eric

On 7/16/07, Ofer Inbar [EMAIL PROTECTED] wrote:

We've got a couple of production databases using mostly MyISAM tables,
that can't be taken offline without bringing down our application.  To
reduce downtime, we run a full mysqldump once a week and back up the
binary logs every day, so we can always use them to catch up from
the most recent full dump.  Because we're mostly using MyISAM we can't
make the dump a transaction, so the database is very slow for about 10
minutes while we run the dump.  This will get longer and longer as our
database grows.

We could eliminate the slowness entirely if we ran full dumps off a
replication slave.  We could do it on a slave not in use by the
application at that time.  However, the master data in that dump
file would refer to the slave's binary logs, not the real master.
That means we couldn't use that dump to start new replication slaves,
nor to restore a master and catch up (though the latter is less
important since we could could run these dumps more often).

One tactic that seems to work is to stop replication on the slave,
note the master data in show slave status, run a dump, and keep that
master data alongside that dump.  This is clunky for several reasons;
it's harder to automate the backup, harder to automate the restore,
and error-prone.

Is there any way to do a mysqldump of a replication slave and have
that dumpfile contain the master data for the master server?
  -- Cos

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





--
Eric Bergen
[EMAIL PROTECTED]
http://www.provenscaling.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: slave backups master data

2007-07-16 Thread Baron Schwartz

Hi,

Ofer Inbar wrote:

We've got a couple of production databases using mostly MyISAM tables,
that can't be taken offline without bringing down our application.  To
reduce downtime, we run a full mysqldump once a week and back up the
binary logs every day, so we can always use them to catch up from
the most recent full dump.  Because we're mostly using MyISAM we can't
make the dump a transaction, so the database is very slow for about 10
minutes while we run the dump.  This will get longer and longer as our
database grows.

We could eliminate the slowness entirely if we ran full dumps off a
replication slave.  We could do it on a slave not in use by the


This doesn't address your question directly, but I have gotten in the habit of warning 
people to verify that their slaves do have exactly the same data as the master.  Many 
people assume it does, but when they check, they find out there are differences, 
usually attributable to bugs in replication.  Backing up from slaves is wonderful, but 
it is only a good idea if the slave's data is right :-)


This is why I wrote MySQL Table Checksum, currently as far as I know the only way to 
verify a slave's data: http://mysqltoolkit.sourceforge.net/


cheers
Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Slave behind master... or not ?

2006-09-05 Thread Michael Loftis



--On September 5, 2006 3:18:21 PM +0200 Jocelyn Fournier 
[EMAIL PROTECTED] wrote:



Hi,





Any idea of what could be wrong here ?


My guess is that the variable is based on the last update timestamp, and 
the last time that the slave has seen data from the master.  If it had been 
about a minute since the last update, then an update came through and the 
slave then saw the update it would think oh I'm about a minute behind since 
my timestamp is about a minute behind the timestamp I just saw.


They're not constantly exchanging heartbeats or anything of any kind.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Slave behind master... or not ?

2006-09-05 Thread Jocelyn Fournier

Hi,

Thanks for the answer.
I don't think this is what's happening because I can also see within a 
few seconds :


0
48
0
48
0

for example.

Thanks,
  Jocelyn

Michael Loftis a écrit :



--On September 5, 2006 3:18:21 PM +0200 Jocelyn Fournier 
[EMAIL PROTECTED] wrote:



Hi,





Any idea of what could be wrong here ?


My guess is that the variable is based on the last update timestamp, and 
the last time that the slave has seen data from the master.  If it had 
been about a minute since the last update, then an update came through 
and the slave then saw the update it would think oh I'm about a minute 
behind since my timestamp is about a minute behind the timestamp I just 
saw.


They're not constantly exchanging heartbeats or anything of any kind.





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Slave behind master... or not ?

2006-09-05 Thread Atle Veka
Jocelyn, without more information about how many queries your system has,
it's impossible to say. I do not know how MySQL calculates the
'Seconds_Behind_Master' data, but:
If your system has bursts of queries, why is the data represented
below confusing? What if inbetween your 1st and 2nd 'SHOW SLAVE STATUS'
query a large amount of replicated queries were processed causing the
slave to temporarily lag behind.


Atle
-
Flying Crocodile Inc, Unix Systems Administrator

On Tue, 5 Sep 2006, Jocelyn Fournier wrote:

 Hi,

 I encounter a really strange behaviour with some of my slaves servers :

 I'm using MySQL 4.1.20 x86_64 on both master and slave servers.
 If I issue three times the command SHOW SLAVE STATUS several times in a
 few seconds, I could obtain the following results for the
 Seconds_Behind_Master column :

 0
 48
 0

 I don't understand how it's possible within 1 or 2 seconds to switch
 from 0 second behind master to 48 seconds behind master and then back
 again to 0 second behind master.

 Any idea of what could be wrong here ?

 Thanks,
  Jocelyn



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Slave to Master Connection

2001-04-08 Thread Jeremy Zawodny

On Mon, Apr 09, 2001 at 10:37:36AM +0530, MCA Department PESIT wrote:

 the error that i specifically get when the slave tries to connect to 
 the master  is
 
 010409 10:44:58  Slave thread: error connecting to master:Can't connect to 
 MySQL
   server on '192.168.1.2' (111)(107), retry in 60 sec
 
 even if i try to run mysql -h master the same error happens.  what
 could be wrong ??

Are the username/password correct? Is there anything in the error log
on the master?

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878Fax: (408) 530-5454
Cell: (408) 439-9951

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php