1

MySQL server + phpmyadmin

On the replication tab, it looks like someone already configured the master replication:

enter image description here

However, I do not see the following lines in my.cnf, which should have been added at the time the master was configured :

server-id=*****
log-bin=******
log-error=*****

How do I retrieve those values? Or how do I reset the master configuration so that I can perform the whole process myself (I also want to select/ignore new databases)?

BassMHL
  • 8,523
  • 9
  • 50
  • 67
  • from command line inside mysql `SHOW MASTER STATUS \G;` ? I never did but I think you can execute this query in phpMyadmin if your user has the permissions – Elzo Valugi Nov 30 '16 at 15:42
  • `SHOW MASTER STATUS` (without \G that is not working) displays 5 things: File, Position that have values; and Binlog_Do_DB, Binlog_Ignore_DB and Executed_Gtid_Set that are empty. – BassMHL Nov 30 '16 at 15:54
  • You should have also the database that is replicated in `Binlog_Do_DB: db_name` – Elzo Valugi Nov 30 '16 at 16:28
  • check this post: https://stackoverflow.com/questions/580331/determine-which-configuration-file-is-being-used – Elzo Valugi Nov 30 '16 at 16:29

1 Answers1

0

I finally managed to solve my issue.

Note: The server-id is just a unique identifier that you can chose.

I had to enter those lines in the master's my.cnf file:

#master my.cnf
server-id = 1
log_bin = /var/lib/mysql/mysql-bin.log
binlog_do_db=database1
binlog_do_db=database2
binlog_do_db=database3
binlog_do_db=database4
binlog_do_db=database5

And those lines in the slave's my.cnf file:

#slave my.cnf
server-id = 2
replicate-do-db=database1
replicate-do-db=database2
replicate-do-db=database3
replicate-do-db=database4
replicate-do-db=database5

Then on the slave server's phpmyadmin go to replication tab and click Stop SQL Thread only and Stop IO Thread only

BassMHL
  • 8,523
  • 9
  • 50
  • 67