How to configure MySQL on Master Node

April 8, 2024 / MySQL

This guide explains how to configure MySQL on Master Node. By default, MySQL listens on the localhost and does not allow connection from the remote system. Therefore, you will need to configure MySQL to listen on the public IP.

Follow the steps –

  1. To do so, edit the MySQL default configuration file –
    nano /etc/mysql/mysql.conf.d/mysqld.cnf
  2. Find the following line –
    bind-address = 127.0.0.1
  3. Replace it with the following line –
    bind-address = Your-Master-IP
  4. Next, uncomment the following line –
    server-id = 1
  5. Next, add the following lines at the end of the file –
    log_bin = /var/log/mysql/mysql-bin.log log_bin_index =/var/log/mysql/mysql-bin.log.index relay_log = /var/log/mysql/mysql-relay-bin relay_log_index = /var/log/mysql/mysql-relay-bin.index
  6. Save and close the file then restart the MySQL service to apply the changes –
    systemctl restart mysql

This way, you can configure MySQL on Master Node. For more assistance, contact our support staff.

 

Dominos Search