MySQL: Install on CentOS7 by Ansible
前期的Ansible的安装与配置和前一篇描述的一样,因此这一篇从上传Ansible脚本与执行开始;
上传脚本:
测试连通性:
准备安装:
可以看到,已经自动安装好了,并且MySQL的服务也启动了。
[……]
Adamhuan's Data Center - 【逻辑驱动数据】
数据玩物、代码屋、1/0游戏:(零和博弈)/ 禅宗意志 / 规则战争 / 解放数据力量 / 技术的飞速发展并没有改变这个世界,因为,这个世界从没有变,它只是越来越趋近于它本来的模样。
前期的Ansible的安装与配置和前一篇描述的一样,因此这一篇从上传Ansible脚本与执行开始;
上传脚本:
测试连通性:
准备安装:
可以看到,已经自动安装好了,并且MySQL的服务也启动了。
[……]
Linux:配置
配置YUM缓存:
Percona
安装:percona-release
这样就安装好了。
该RPM可以为系统安装一个工具:percona-release
该命令更详细的帮助文档,可以参阅:
https://www.percona.com[……]
开始本文档之前,需要安装go语言支持,版本:1.14以上
在CentOS7.8上安装go支持可以参考这篇文档:
http://d-prototype.com/archives/15694
goInception的github官方网站: https://github.com/hanchuanchua[……]
如题所示的错误发生在Percona的PXC的非正常关库的时候,具体如下:
报错内容:
1 2 3 |
[root@percona-mysql-01 mysql]# systemctl start mysql@bootstrap.service Job for mysql@bootstrap.service failed because the control process exited with error code. See "systemctl status mysql@bootstrap.service" and "journalctl -xe" for details. [root@percona-mysql-01 mysql]# |
日志的内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
2020-04-08T17:25:30.561290Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2020-04-08T17:25:30.563500Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.28-31-57-log) starting as process 19499 ... 2020-04-08T17:25:30.567587Z 0 [Note] WSREP: Setting wsrep_ready to false 2020-04-08T17:25:30.567619Z 0 [Note] WSREP: No pre-stored wsrep-start position found. Skipping position initialization. 2020-04-08T17:25:30.567637Z 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera3/libgalera_smm.so' 2020-04-08T17:25:30.570609Z 0 [Note] WSREP: wsrep_load(): Galera 3.41(rb3295e6) by Codership Oy <info @codership.com> loaded successfully. 2020-04-08T17:25:30.570848Z 0 [Note] WSREP: CRC-32C: using hardware acceleration. 2020-04-08T17:25:30.571685Z 0 [Note] WSREP: Found saved state: f0ae4bd5-78c7-11ea-a173-6a64eeb13518:12, safe_to_bootstrap: 0 2020-04-08T17:25:30.573689Z 0 [Note] WSREP: Passing config to GCS: base_dir = /var/lib/mysql/; base_host = 192.168.72.21; base_port = 4567; cert.log_conflicts = no; cert.optimistic_pa = yes; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 10; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 4; evs.view_forget_timeout = PT24H; gcache.dir = /var/lib/mysql/; gcache.freeze_purge_at_seqno = -1; gcache.keep_pages_count = 0; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /var/lib/mysql//galera.cache; gcache.page_size = 128M; gcache.recover = no; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1; gcs.fc_limit = 100; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.segment = 0; gmcast.version = 0; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 9; socket.checksum = 2; socket.recv_buf_size = 212992; 2020-04-08T17:25:30.589323Z 0 [Note] WSREP: GCache history reset: f0ae4bd5-78c7-11ea-a173-6a64eeb13518:0 -> f0ae4bd5-78c7-11ea-a173-6a64eeb13518:12 2020-04-08T17:25:30.589940Z 0 [Note] WSREP: Assign initial position for certification: 12, protocol version: -1 2020-04-08T17:25:30.589978Z 0 [Note] WSREP: Preparing to initiate SST/IST 2020-04-08T17:25:30.589989Z 0 [Note] WSREP: Starting replication 2020-04-08T17:25:30.590021Z 0 [Note] WSREP: Setting initial position to f0ae4bd5-78c7-11ea-a173-6a64eeb13518:12 2020-04-08T17:25:30.590043Z 0 [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 . 2020-04-08T17:25:30.590053Z 0 [ERROR] WSREP: Provider/Node (gcomm://192.168.72.21,192.168.72.22,192.168.72.23) failed to establish connection with cluster (reason: 7) 2020-04-08T17:25:30.590059Z 0 [ERROR] Aborting 2020-04-08T17:25:30.590086Z 0 [Note] Giving 0 client threads a chance to die gracefully 2020-04-08T17:25:30.590114Z 0 [Note] WSREP: Waiting for active wsrep applier to exit 2020-04-08T17:25:30.590126Z 0 [Note] WSREP: Service disconnected. 2020-04-08T17:25:30.590153Z 0 [Note] WSREP: Waiting to close threads...... 2020-04-08T17:25:35.593634Z 0 [Note] WSREP: Some threads may fail to exit. 2020-04-08T17:25:35.593770Z 0 [Note] Binlog end 2020-04-08T17:25:35.593988Z 0 [Note] /usr/sbin/mysqld: Shutdown complete </info> |
解法:
[crayon-63d4[……]