Commit Graph

16 Commits

Author SHA1 Message Date
Sameer Naik 2ada7f8d48 tests: Can't setup replication slave without replication user 2015-09-10 20:32:25 +05:30
Sameer Naik e996d40828 replication: `MARIADB_DATABASE` is required to setup a replication slave 2015-09-10 14:56:01 +05:30
Sameer Naik 6c523f7b16 replication: check connection to replication master before taking a database dump 2015-09-10 14:33:05 +05:30
Sameer Naik 90116b2396 replication without any downtime 2015-08-12 13:49:47 +05:30
Sameer Naik b37908144d output formatting 2015-08-12 13:49:47 +05:30
Sameer Naik de21f71bf8 add `--log-bin=mysql-bin` to `master` only 2015-08-12 13:49:47 +05:30
Sameer Naik bc3a8f788b give `MARIADB_USER` all the required rights to do a `mysqldump` 2015-08-12 13:49:47 +05:30
Sameer Naik b9380a0f61 fix `mysqldump` output so that it is compatible with the `--init-file` option 2015-08-12 13:49:47 +05:30
Sameer Naik da687232d6 configure `mysqldump` to add the `SLAVE START` statement 2015-08-12 13:49:47 +05:30
Sameer Naik 4cf7c4702b configure the MASTER_HOST before taking the dump
If you specify the `MASTER_HOST` or `MASTER_PORT` option, the slave assumes
that the master server is different from before (even if the option
value is the same as its current value.) In this case, the old values
for the master binary log file name and position are considered no
longer applicable, so if you do not specify `MASTER_LOG_FILE` and
`MASTER_LOG_POS` in the statement, `MASTER_LOG_FILE=''` and `MASTER_LOG_POS=4`
are silently appended to it.

Do avoid the resetting of `MASTER_LOG_FILE` and `MASTER_LOG_POS`, we
generated the dump after setting the `MASTER_HOST`

https://dev.mysql.com/doc/refman/5.0/en/change-master-to.html
2015-08-12 13:49:47 +05:30
Sameer Naik 993b16471e added master/slave replication support
Example,

Start master:

```bash
docker run -it --rm --name mariadb-master \
  -e 'MARIADB_USER=root' -e 'MARIADB_PASSWORD=password' \
  -e 'MARIADB_DATABASE=newdatabase' \
  -e 'REPLICATION_MODE=master' -e 'REPLICATION_USER=slave' -e 'REPLICATION_PASSWORD=slavepassword' \
  bitnami/mariadb
```

Start Slave:

```bash
docker run -it --rm --name mariadb-slave \
  --link mariadb-master:mariadb-master \
  -e 'MARIADB_USER=root' -e 'MARIADB_PASSWORD=password' \
  -e 'MARIADB_DATABASE=newdatabase' -e 'REPLICATION_MODE=slave' \
  bitnami/mariadb
```
2015-08-12 13:49:47 +05:30
Sameer Naik 49abef4681 fix: append user specified arguments while launching the mariadb server 2015-07-21 09:21:22 +05:30
Adnan Abdulhussein 195fe455aa Fix spelling in creating user message 2015-06-11 11:16:19 -07:00
Miguel Martinez dd34eb16de Refactoring + welcome page 2015-06-09 19:29:56 -07:00
Miguel Martinez 57844c5162 Renaming MYSQL to MARIADB, Refs T3975, T3790 2015-06-09 15:35:46 -07:00
Miguel Martinez 819921c23b New MariaDB entrypoint, dockerfile and postinstall script 2015-06-09 15:29:59 -07:00