From f9c7742e8814dde7f8e205539f337b4831450101 Mon Sep 17 00:00:00 2001 From: Andy Stevens Date: Fri, 28 Sep 2018 15:46:04 -0400 Subject: [PATCH 1/5] Updated for Ubuntu 18.04 and Debian 9 --- .../index.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md index 00fb3afe840..a9744d4223a 100644 --- a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md +++ b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md @@ -7,7 +7,7 @@ og_description: 'MySQL Master-Master replication adds speed and redundancy. With keywords: ["set up mysql", "replication", "master-master", "high availability"] license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' aliases: ['databases/mysql/backup-options/', 'databases/mysql/mysql-master-master/', 'databases/mysql/mysql-master-master-replication/'] -modified: 2017-10-10 +modified: 2018-09-28 modified_by: name: Linode published: 2014-12-24 @@ -25,17 +25,21 @@ MySQL Master-Master replication adds speed and redundancy for active websites. W {{< note >}} This guide is written for a non-root user. Commands that require elevated privileges are prefixed with `sudo`. If you're not familiar with the `sudo` command, you can check our [Users and Groups](/docs/tools-reference/linux-users-and-groups) guide. -This guide is written for Debian 7 or Ubuntu 14.04. +This guide is written for Debian 9 or Ubuntu 18.04. {{< /note >}} ## Install MySQL -Use the following commands to install MySQL on each of the Linodes: +1. Use the following commands to install MySQL on each of the Linodes: sudo apt-get update sudo apt-get upgrade -y sudo apt-get install mysql-server mysql-client +2. Run the MySQL secure installation command. You will be asked to create a root password. It is recommended you select yes to all of the questions: + + mysql_secure_installation + ## Edit MySQL's Configuration 1. Edit the `/etc/mysql/my.cnf` file on each of the Linodes. Add or modify the following values: @@ -43,6 +47,7 @@ Use the following commands to install MySQL on each of the Linodes: **Server 1:** {{< file "/etc/mysql/my.cnf" >}} +[mysqld] server_id = 1 log_bin = /var/log/mysql/mysql-bin.log log_bin_index = /var/log/mysql/mysql-bin.log.index @@ -60,6 +65,7 @@ auto-increment-offset = 1 **Server 2:** {{< file "/etc/mysql/my.cnf" >}} +[mysqld] server_id = 2 log_bin = /var/log/mysql/mysql-bin.log log_bin_index = /var/log/mysql/mysql-bin.log.index @@ -84,7 +90,7 @@ bind-address = x.x.x.x 3. Once completed, restart the MySQL application: - sudo service mysql restart + sudo systemctl restart mysql ## Create Replication Users From ec511196afe1684e13823f35fe63d090f39cb2e6 Mon Sep 17 00:00:00 2001 From: Andy Stevens Date: Fri, 28 Sep 2018 15:47:51 -0400 Subject: [PATCH 2/5] Fixed indentations --- .../index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md index a9744d4223a..fbeba0a95c0 100644 --- a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md +++ b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md @@ -32,13 +32,13 @@ This guide is written for Debian 9 or Ubuntu 18.04. 1. Use the following commands to install MySQL on each of the Linodes: - sudo apt-get update - sudo apt-get upgrade -y - sudo apt-get install mysql-server mysql-client + sudo apt-get update + sudo apt-get upgrade -y + sudo apt-get install mysql-server mysql-client 2. Run the MySQL secure installation command. You will be asked to create a root password. It is recommended you select yes to all of the questions: - mysql_secure_installation + mysql_secure_installation ## Edit MySQL's Configuration From 50f853de8c6a3284d80c8c7580cefdae181ea0f4 Mon Sep 17 00:00:00 2001 From: Angel Date: Mon, 1 Oct 2018 15:37:25 -0400 Subject: [PATCH 3/5] copy tech --- .../configure-master-master-mysql-database-replication/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md index fbeba0a95c0..2269cd4e416 100644 --- a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md +++ b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md @@ -80,7 +80,7 @@ auto-increment-offset = 2 {{< /file >}} -2. For each of the Linodes, edit the `bind-address` configuration in order to use the private IP addresses: +2. Edit the `bind-address` configuration in order to use the private IP addresses, for each of the Linodes. {{< file "/etc/mysql/my.cnf" >}} bind-address = x.x.x.x From 003749bb921686629b436ff83ccbf25bc46c5567 Mon Sep 17 00:00:00 2001 From: Angel Date: Mon, 1 Oct 2018 15:55:11 -0400 Subject: [PATCH 4/5] travis --- .../configure-master-master-mysql-database-replication/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md index 2269cd4e416..2fef8ef88bf 100644 --- a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md +++ b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md @@ -80,7 +80,7 @@ auto-increment-offset = 2 {{< /file >}} -2. Edit the `bind-address` configuration in order to use the private IP addresses, for each of the Linodes. +2. Edit the `bind-address` configuration in order to use the private IP addresses, for each of the Linodes. {{< file "/etc/mysql/my.cnf" >}} bind-address = x.x.x.x From 76d40ddba825105a0459e825085a2dbe8a626f11 Mon Sep 17 00:00:00 2001 From: Angel Date: Mon, 17 Dec 2018 14:53:16 -0500 Subject: [PATCH 5/5] Update index.md --- .../configure-master-master-mysql-database-replication/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md index 2fef8ef88bf..8b543e4ae11 100644 --- a/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md +++ b/docs/databases/mysql/configure-master-master-mysql-database-replication/index.md @@ -7,7 +7,7 @@ og_description: 'MySQL Master-Master replication adds speed and redundancy. With keywords: ["set up mysql", "replication", "master-master", "high availability"] license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' aliases: ['databases/mysql/backup-options/', 'databases/mysql/mysql-master-master/', 'databases/mysql/mysql-master-master-replication/'] -modified: 2018-09-28 +modified: 2018-12-18 modified_by: name: Linode published: 2014-12-24