MySQL replication server

--=-QxH6HocMCaEN3WPyqvC1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Hi All

sorry to bother everyone again..... but now I have a question from a
client which I am sure about my answer, however need to confirm.

When setting up a master/slave replication set.

As I understand it, the slave server can't accept any writes,
however it will be able to accept reads.

Is this correct, or will the slave server still be able to
accept writes as well (even though it may not be replicated) ?

Kind Regards

Machiel

--=-QxH6HocMCaEN3WPyqvC1--
machielr [ Mo, 22 November 2010 12:06 ] [ ID #2050623 ]

Re: MySQL replication server

--0016362843d648b5f90495a38d1e
Content-Type: text/plain; charset=ISO-8859-1

You are correct, in a master slave setup the slave does not accept writes.

John

On 22 November 2010 11:06, Machiel Richards <machielr [at] rdc.co.za> wrote:

> Hi All
>
> sorry to bother everyone again..... but now I have a question from a
> client which I am sure about my answer, however need to confirm.
>
> When setting up a master/slave replication set.
>
> As I understand it, the slave server can't accept any writes,
> however it will be able to accept reads.
>
> Is this correct, or will the slave server still be able to
> accept writes as well (even though it may not be replicated) ?
>
> Kind Regards
>
> Machiel
>



--
John Daisley

Certified MySQL 5 Database Administrator
Certified MySQL 5 Developer
Cognos BI Developer

Telephone: +44 (0)7918 621621
Email: john.daisley [at] butterflysystems.co.uk

--0016362843d648b5f90495a38d1e--
John Daisley [ Mo, 22 November 2010 13:39 ] [ ID #2050625 ]

Re: MySQL replication server

Hi,

I think you are wrong, slaves will always accept writes unless you
set readonly in the mysql config.
Due to this, and if you dont specifically set readonly on the slave
you have to be very careful in order to maintain data integrity on the
slave and also not to break repliacton. Tools like Maatkit are
designed to check data integrity on the slave due to exactly this issue,

thanks Andy.

Quoting John Daisley <daisleyjohn [at] googlemail.com>:

> You are correct, in a master slave setup the slave does not accept writes.
>
> John
>
> On 22 November 2010 11:06, Machiel Richards <machielr [at] rdc.co.za> wrote:
>





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2 [at] m.gmane.org
a.smith [ Mo, 22 November 2010 14:03 ] [ ID #2050626 ]

Re: MySQL replication server

--=-qz00xK4vrM5jen00yfDz
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

My reason for asking this is the following....


The client have database A on one machine, Database B on a second
machine both of which are production.

They want to setup replication of Database B to Server hosting Database
A and still keep Server A as the primary production system.





-----Original Message-----
From: a.smith [at] ukgrid.net
To: John Daisley <daisleyjohn [at] googlemail.com>
Cc: Machiel Richards <machielr [at] rdc.co.za>, mysql mailing list
<mysql [at] lists.mysql.com>
Subject: Re: MySQL replication server
Date: Mon, 22 Nov 2010 13:03:38 +0000


Hi,

I think you are wrong, slaves will always accept writes unless you
set readonly in the mysql config.
Due to this, and if you dont specifically set readonly on the slave
you have to be very careful in order to maintain data integrity on the
slave and also not to break repliacton. Tools like Maatkit are
designed to check data integrity on the slave due to exactly this issue,

thanks Andy.

Quoting John Daisley <daisleyjohn [at] googlemail.com>:

> You are correct, in a master slave setup the slave does not accept writes.
>
> John
>
> On 22 November 2010 11:06, Machiel Richards <machielr [at] rdc.co.za> wrote:
>







--=-qz00xK4vrM5jen00yfDz--
machielr [ Mo, 22 November 2010 14:06 ] [ ID #2050627 ]

Re: MySQL replication server

--001636283fa6401a410495a3f22b
Content-Type: text/plain; charset=ISO-8859-1

The replicated database should not be accepting writes, if it is then you
haven't set it up correctly

On 22 November 2010 13:03, <a.smith [at] ukgrid.net> wrote:

> Hi,
>
> I think you are wrong, slaves will always accept writes unless you set
> readonly in the mysql config.
> Due to this, and if you dont specifically set readonly on the slave you
> have to be very careful in order to maintain data integrity on the slave and
> also not to break repliacton. Tools like Maatkit are designed to check data
> integrity on the slave due to exactly this issue,
>
> thanks Andy.
>
>
> Quoting John Daisley <daisleyjohn [at] googlemail.com>:
>
> You are correct, in a master slave setup the slave does not accept writes.
>>
>> John
>>
>> On 22 November 2010 11:06, Machiel Richards <machielr [at] rdc.co.za> wrote:
>>
>>
>
>
>
>


--
John Daisley

Certified MySQL 5 Database Administrator
Certified MySQL 5 Developer
Cognos BI Developer

Telephone: +44 (0)7918 621621
Email: john.daisley [at] butterflysystems.co.uk

--001636283fa6401a410495a3f22b--
John Daisley [ Mo, 22 November 2010 14:08 ] [ ID #2050628 ]

Re: MySQL replication server

Additionally, if a user has the SUPER privilege (eg. all privileges on
*.*) they can write to a database running in read-only mode. Yet
another reason to never allow this privilege for general purpose users.

Tyler

On 11/22/10 8:08 AM, John Daisley wrote:
> The replicated database should not be accepting writes, if it is then you
> haven't set it up correctly
>
> On 22 November 2010 13:03,<a.smith [at] ukgrid.net> wrote:
>
>> Hi,
>>
>> I think you are wrong, slaves will always accept writes unless you set
>> readonly in the mysql config.
>> Due to this, and if you dont specifically set readonly on the slave you
>> have to be very careful in order to maintain data integrity on the slave and
>> also not to break repliacton. Tools like Maatkit are designed to check data
>> integrity on the slave due to exactly this issue,
>>
>> thanks Andy.
>>
>>
>> Quoting John Daisley<daisleyjohn [at] googlemail.com>:
>>
>> You are correct, in a master slave setup the slave does not accept writes.
>>> John
>>>
>>> On 22 November 2010 11:06, Machiel Richards<machielr [at] rdc.co.za> wrote:
>>>
>>>
>>
>>
>>
>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2 [at] m.gmane.org
Tyler Poland [ Mo, 22 November 2010 15:05 ] [ ID #2050629 ]

Re: MySQL replication server

Hi,

so yes you can do that, but then I guess you cannot set the server
hosting database A as readonly (from memory this can only be set
server wide, but worht checking it out). Which might leave you a few
options to ensure data integrity, for example simply by user security
either by disabling access to relevant users or via setting grants
appropriately. Or you could look at a second MySQL instance on the
database A server either listening on another port or in a virtual
server/zone/jail,

Andy.

Quoting Machiel Richards <machielr [at] rdc.co.za>:

> My reason for asking this is the following....
>
>
> The client have database A on one machine, Database B on a second
> machine both of which are production.
>
> They want to setup replication of Database B to Server hosting Database
> A and still keep Server A as the primary production system.
>





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2 [at] m.gmane.org
a.smith [ Mo, 22 November 2010 15:10 ] [ ID #2050630 ]

Re: MySQL replication server

--0022152d5cbdbd584b0495a52e51
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Nov 22, 2010 at 2:08 PM, John Daisley <daisleyjohn [at] googlemail.com>wrote:

> The replicated database should not be accepting writes, if it is then you
> haven't set it up correctly
>

*shrug*

I never bother. The slave is way too useful to fuck around with
optimisations and whatnot, reporting tools tend to do useful aggregations,
et cetera.

You may like to set it read-only, but that doesn't make it the only way, let
a lone a requirement.


--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--0022152d5cbdbd584b0495a52e51--
Johan De Meersman [ Mo, 22 November 2010 15:36 ] [ ID #2050634 ]
Datenbanken » gmane.comp.db.mysql.general » MySQL replication server

Vorheriges Thema: Upgrading of mysql database
Nächstes Thema: need Help - Mysqldump issue