amend innodb recover doc with a few extra bits
This commit is contained in:
parent
b6e31f8df6
commit
701f19ab9c
@ -6,11 +6,16 @@ mysql-innodb-cluster/1 active idle 1/lxd/6 10.0.1.114
|
||||
mysql-innodb-cluster/2* active idle 2/lxd/6 10.0.1.156 Unit is ready: Mode: R/O, Cluster is ONLINE and can tolerate up to ONE failure.
|
||||
```
|
||||
|
||||
1. Grab a backup of the mysql Database
|
||||
|
||||
```
|
||||
juju run-action --wait mysql-innodb-cluster/leader mysqldump
|
||||
```
|
||||
|
||||
1. Stop the mysql on the unit `mysql-innodb-cluster/0`
|
||||
|
||||
```
|
||||
sudo systemctl stop mysql
|
||||
sudo mv /var/lib/mysql /var/lib/mysql.old
|
||||
```
|
||||
|
||||
1. Remove the member from the cluster
|
||||
@ -36,6 +41,7 @@ mysql-innodb-cluster/2* active idle 2/lxd/6 10.0.1.156
|
||||
```
|
||||
juju ssh mysql-innodb-cluster/0
|
||||
|
||||
sudo -i
|
||||
cd /var/lib
|
||||
mv mysql mysql.old.$(date +%s)
|
||||
mkdir mysql
|
||||
@ -54,6 +60,12 @@ mysql-innodb-cluster/2* active idle 2/lxd/6 10.0.1.156
|
||||
[Note] [MY-010454] [Server] A temporary password is generated for root@localhost: wyPd_?kEd03p
|
||||
```
|
||||
|
||||
This can easily grabbed by running the following command
|
||||
|
||||
```
|
||||
grep temporary /var/log/mysql/error.log
|
||||
```
|
||||
|
||||
First we need to get the root password that is stored
|
||||
|
||||
```
|
||||
@ -94,7 +106,7 @@ mysql-innodb-cluster/2* active idle 2/lxd/6 10.0.1.156
|
||||
mysql -u clusteruser -p -e 'SELECT user,host FROM mysql.user'
|
||||
```
|
||||
|
||||
1. Re-add instance to cluster:
|
||||
1. Re-add instance to cluster (you may need to replace `leader` by the unit number that is `Mode: R/W`:
|
||||
|
||||
```
|
||||
juju run-action --wait mysql-innodb-cluster/leader add-instance address=10.0.1.137
|
||||
@ -133,4 +145,4 @@ After that check the cluster status:
|
||||
|
||||
```
|
||||
juju run-action --wait mysql-innodb-cluster/leader cluster-status
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user