← Back to team overview

maria-discuss team mailing list archive

Re: Don't replicate procedures in the mysql database


Per the MySQL documentation, it is noted that replicate-*-table
options do only apply to tables, and replicate-*-db options are
suggested to filter stored procedures, functions and events.  I
imagine that applies similarly to MariaDB.

The various *-db filters can be problematic[1], but perhaps will work
well enough for your case.   If I understand your problem, I think
maybe replicate-ignore-db=mysql might work.  I believe if you want to
apply that filter to only selective connections w/ Multi-source
replication, you have to specify it in the my.cnf[2] and restart the

[1] https://www.percona.com/blog/2009/05/14/why-mysqls-binlog-do-db-option-is-dangerous/
[2] https://mariadb.com/kb/en/mariadb/multi-source-replication/#fixedreplicate-fixed-variables

On Mon, Aug 29, 2016 at 8:44 AM, Игорь Пашев <pashev.igor@xxxxxxxxx> wrote:
> 2016-08-29 1:25 GMT+03:00 Daniel Black <daniel.black@xxxxxxxxxxx>:
>> A question for you is why is it important not to have it on the slave?
> Because the slave already has this procedure with a slightly different
> implementation,
> and different owner (definer).
>> If the slave is a failover it should have the procedure.
> If I wanted a failover server I would not be fiddling with replication
> options and channels at all.
>>> When I execute `CREATE PROCEDURE mysql.bar` on the master, this
>>> procedure appears on the slave.
>> Which is what replication is meant to do.
> This is not consistent with creating and modifying mysql users.
> That's why I'm asking.
>> Its probably also best not to populate the mysql database with your
>> stored procedures.
> It's totally fine for maintenance procedures.
> See for example
> http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.SQLRef.html
>> set session sql_log_bin=0; create procedure...
> This is not scalable and sometime impossible:
> for the SUPER privilege, at Amazon RDS, it could break other slaves.
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-discuss
> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp

Follow ups