Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

replicate-do-table unable to start slave mysql

I have problems starting slave server when I add replicate-do-table. Current config that works:

server-id=2
master-host=10.100.27.99
master-user=slejv
master-password=<pass>
master-connect-retry=60
replicate-do-db=piksearch

Config that doesn't work:

server-id=2
master-host=10.100.27.99
master-user=slejv
master-password=<pass>
master-connect-retry=60
replicate-do-db=piksearch
replicate-do-table=artikli
replicate-do-table=artikli_polja
replicate-do-table=artikli_posjete8
replicate-do-table=artikli_view
replicate-do-table=kategorije
replicate-do-table=online
replicate-do-table=pitanje_artikal
replicate-do-table=polja

server02:/etc/mysql# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

like image 396
sabansaulic Avatar asked Feb 22 '23 00:02

sabansaulic


1 Answers

see this link:

replicate-do-db is in contrast to replicate-do-table

you must remove:

replicate-do-db=piksearch
replicate-do-table=artikli
replicate-do-table=artikli_polja
replicate-do-table=artikli_posjete8
replicate-do-table=artikli_view
replicate-do-table=kategorije
replicate-do-table=online
replicate-do-table=pitanje_artikal
replicate-do-table=polja

and write:

replicate-do-table=piksearch.artikli
replicate-do-table=piksearch.artikli_polja
...
like image 91
seyed Avatar answered Feb 24 '23 17:02

seyed