feat: add fancy import
This commit is contained in:
parent
c2591be0ac
commit
8cb43d6f92
1 changed files with 20 additions and 8 deletions
|
|
@ -84,6 +84,18 @@ mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS databeast;"
|
||||||
mysql -u root -p < /tmp/databeast.sql
|
mysql -u root -p < /tmp/databeast.sql
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Import in one go
|
||||||
|
```shell
|
||||||
|
mariadb-dump -h source.example.com \
|
||||||
|
-u replicator \
|
||||||
|
-psupersecure \
|
||||||
|
--single-transaction \
|
||||||
|
--gtid \
|
||||||
|
--master-data=1
|
||||||
|
--databases databeast | \
|
||||||
|
mysql -u replicator -psupersecure databeast
|
||||||
|
```
|
||||||
|
|
||||||
### Activate replication
|
### Activate replication
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
@ -91,14 +103,14 @@ mysql -u root -p
|
||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
STOP REPLICA;
|
STOP SLAVE;
|
||||||
RESET REPLICA;
|
RESET SLAVE;
|
||||||
CHANGE REPLICATION SOURCE TO
|
CHANGE MASTER TO
|
||||||
SOURCE_HOST='source.example.com',
|
MASTER_HOST='source.example.com',
|
||||||
SOURCE_USER='replicator',
|
MASTER_USER='replicator',
|
||||||
SOURCE_PASSWORD='supersecure',
|
MASTER_PASSWORD='supersecure',
|
||||||
SOURCE_USE_GTID=slave_pos;
|
MASTER_USE_GTID=slave_pos;
|
||||||
START REPLICA;
|
START SLAVE;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Monitor replication
|
## Monitor replication
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue