MySQL replication between ubuntu 18.04 LTS and bitnami drupal with mysql 8 ubuntu 16.04

Keywords: MySQL - AWS - Technical issue - Other
bnsupport ID: f552e35d-3e17-88b8-6b65-4dd9fcd44635
Description:
I am looking to setup MySQL 8 replication between ubuntu 18.04 LTS in an on-premises server with ufw firewall rules setup and bitnami drupal with mysql 8 ubuntu 16.04 on AWS Lightsail. My challenge is setting bitnami server as the slave. I was looking the URL below but the path and files for the following files does not seem to exist in bitnami instance:

relay-log = /var/log/mysql/mysql-relay-bin.log
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = newdatabase

https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-in-mysql

Can you please provide the path and the correct filenames or send me a URL that will help deal with this configuration?

Hi @sheldontlawrence

Thanks for using Bitnami MySQL!

The guide you have mentioned dates from 2012, so it is more than likely to be outdated. Unfortunately, we do not have any guide covering the topic. Instead, I think it could be a good idea checking out the official documentation:

https://dev.mysql.com/doc/refman/8.0/en/replication-configuration.html

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hi Jose.

The issue that I have was to understand the bitnami SQL paths. The Bitnami paths are not the same as standard Ubuntu linux and as such the MySQL 8 documentation is not help for bitnami specific paths.

Again, please provide the proper Bitnami equivalent paths for each item listed below:

relay-log = /var/log/mysql/mysql-relay-bin.log
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = newdatabase

Hi @sheldontlawrence

The Bitnami paths are not the same as standard Ubuntu linux and as such the MySQL 8 documentation is not help for bitnami specific paths.

You are right about the paths, however my point was that the guide you were following can be outdated and you should check one that matches the version of the application you are trying to tailor.

Bitnami MySQL’s files are set to exist in the /opt/bitnami/mysql path, but let’s check your items:

  1. binlog_do_db --> This is NOT a path, but the name of the database you would like to record binary logs. Additionally, it seems this is no longer a a conf. option but a command line flag Reference here.

  2. log_bin --> As per reference in MySQL 8.0 this should be a boolean (Reference here). Having said that, the path where binary log files are stored is /opt/bitnami/mysql/data.

$ ls -la /opt/bitnami/mysql/data | grep binlog
-rw-r----- 1 mysql mysql     1816 Jan 18 10:09 binlog.000001
-rw-r----- 1 mysql mysql      179 Jan 18 10:09 binlog.000002
-rw-r----- 1 mysql mysql      200 Jan 18 10:33 binlog.000003
-rw-r----- 1 mysql mysql      156 Jan 18 10:33 binlog.000004
-rw-r----- 1 mysql mysql       64 Jan 18 10:33 binlog.index

As you can see, the base name for binlogs is the default one binlog, reference here

  1. relay-log --> As per reference in MySQL 8.0, this should be relay_log (reference here). We are not setting this option, but I recommend you specify it to be under the /opt/bitnami/mysql/data path.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.