MySQL replication server

MySQL replication server

am 22.11.2010 12:06:26 von machielr

--=-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--

Re: MySQL replication server

am 22.11.2010 13:39:49 von John Daisley

--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 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@butterflysystems.co.uk

--0016362843d648b5f90495a38d1e--

Re: MySQL replication server

am 22.11.2010 14:03:38 von a.smith

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 :

> You are correct, in a master slave setup the slave does not accept writes.
>
> John
>
> On 22 November 2010 11:06, Machiel Richards wrote:
>





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: MySQL replication server

am 22.11.2010 14:06:06 von machielr

--=-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@ukgrid.net
To: John Daisley
Cc: Machiel Richards , mysql mailing list

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 :

> You are correct, in a master slave setup the slave does not accept writes.
>
> John
>
> On 22 November 2010 11:06, Machiel Richards wrote:
>







--=-qz00xK4vrM5jen00yfDz--

Re: MySQL replication server

am 22.11.2010 14:08:03 von John Daisley

--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, 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 :
>
> You are correct, in a master slave setup the slave does not accept writes.
>>
>> John
>>
>> On 22 November 2010 11:06, Machiel Richards wrote:
>>
>>
>
>
>
>


--
John Daisley

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

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

--001636283fa6401a410495a3f22b--

Re: MySQL replication server

am 22.11.2010 15:05:40 von Tyler Poland

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, 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:
>>
>> You are correct, in a master slave setup the slave does not accept writes.
>>> John
>>>
>>> On 22 November 2010 11:06, Machiel Richards wrote:
>>>
>>>
>>
>>
>>
>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: MySQL replication server

am 22.11.2010 15:10:06 von a.smith

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 :

> 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@m.gmane.org

Re: MySQL replication server

am 22.11.2010 15:36:33 von Johan De Meersman

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

On Mon, Nov 22, 2010 at 2:08 PM, John Daisley 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--