Step 1.
# mysql -u root -p
Step 2.
CREATE USER 'root'@'%' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
# mysql -u root -p
CREATE USER 'root'@'%' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
CREATE USER 'username'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
[ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. It was not the last one to leave the cluster and may not contain all the updates. To force cluster bootstrap with this node, edit the grastate.dat file manually and set safe_to_bootstrap to 1 .
// see https://severalnines.com/blog/how-bootstrap-mysqlmariadb-galera-cluster
--wsrep-recover
# vim /YOUR_MYSQL_DB_PATH/grastate.dat
# GALERA saved state
version: 2.1
uuid: e02c98a9-e147-11e6-b6e9-e2d770b0c2ba
seqno: -1
safe_to_bootstrap: 0 -> 1
# docker exec -it mariadb bash
SHOW STATUS LIKE 'wsrep_%';
mysql -u root -p
...
wsrep_incoming_addresses | 10.10.10.10:3306,10.10.10.11:3306,10.10.10.12:3306
...
wsrep_local_state_comment | Synced
...
https://severalnines.com/blog/how-bootstrap-mysqlmariadb-galera-cluster
http://benjr.tw/95413
https://dba.stackexchange.com/questions/151941/how-to-restart-mariadb-galera-cluster
http://zjzone.cc/index.php/2017/04/18/mariadb-galera-ji-qun-zi-dong-hui-fu-jiao-ben/