Mysql数据库自建,使用,问题排查最佳实践 本文主要为您介绍Mysql数据库自建,使用,问题排查最佳实践。 创建ECS并自建mysql服务器 前提条件 1.已创建ECS虚机,请参考指定ECS规格创建实例创建MySQL客户端的弹性云服务器,如追求数据库IO读写性能,推荐使用本地盘云主机Ip3。 2.已下载MySQL客户端安装包,MySQL官网提供了针对不同操作系统的客户端安装包,单击此处下载8.0的最新版本,单击此处下载其他归档版本,用户需根据自己的操作系统类型选择符合要求的安装包。 mysql部署 系统设置 确认系统及依赖库版本 本篇使用OS镜像版本为CTyunOS 22.06.3 plaintext [root@localhost ~] cat /etc/ctyunosrelease CTyunOS release 22.06.3 [root@localhost ~] ldd version ldd (GNU libc) 2.28 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper. 确认mysql版本 二进制搭建,mysql 对应的 OS Version 必须和操作系统依赖库版本保持一致,找到对应版本进行下载。 防火墙及SELinux plaintext [root@localhost ~] systemctl disable firewalld now 关闭并禁用防火墙 [root@localhost ~] setenforce 0 关闭selinux setenforce: SELinux is disabled [root@localhost ~] sed i 's/^SELINUXenforcing$/SELINUXdisabled/' /etc/selinux/config 配置持久化