1.安装MariaDB 和Galera
见另外一篇博客
2.1 防火墙和SELinux
这里不做说明,参照网上教程,和官方的配置
2.2. 创建用于节点同步的账号
[root@localhost ~]# mysql -uroot -pMariaDB [(none)]> grant usage on *.* to sst@'%' identified by 'ssTT-488';MariaDB [(none)]> flush privileges;
2.3. 修改mysql默认字符集
MariaDB [(none)]> show variables like 'character%';MariaDB [(none)]> set character_set_server = utf8;MariaDB [(none)]> set character_set_database = utf8;
3.配置相关的参数
http://galeracluster.com/documentation-webpages/training/tutorials/migration.html
http://galeracluster.com/documentation-webpages/training/tutorials/configuration.html
http://galeracluster.com/documentation-webpages/training/tutorials/wsrep-configuration.html
https://mariadb.com/kb/en/library/configuring-mariadb-galera-cluster/
注意:
1.启动第一个节点用的是命令:galera_new_cluster
2.遇到错误查看日志:journalctl -xe
3.参照的一篇博客:https://www.cnblogs.com/liujiduo/p/5066803.html
4.没有很多东西了,配置文件 /etc/my.cnf 很重要
注意:1.wsrep_provider 路径以系统中实际文件路径为准
2.wsrep_cluster_address 后面的参数没有空格,实例中有的是有空格的,把空格去掉
命令:mysql -u root -p 登录MariaDB 数据库
转载于:https://www.cnblogs.com/leolzi/p/11103882.html
相关资源:DirectX修复工具V4.0增强版