ansible使用mysql-8.0.27-1.el7.x86_64.rpm-bundle.tar安装mysql
时间: 2023-10-02 08:05:52 浏览: 180
,怎么安装呢?
首先,需要将mysql-8.0.27-1.el7.x86_64.rpm-bundle.tar解压缩,然后将其中的所有rpm包安装:
tar -xvf mysql-8.0.27-1.el7.x86_64.rpm-bundle.tar
rpm -ivh mysql-community-common-8.0.27-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.27-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.27-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-8.0.27-1.el7.x86_64.rpm
接下来,启动MySQL服务并设置开机启动:
systemctl start mysqld.service
systemctl enable mysqld.service
最后,设置MySQL root用户的密码:
grep 'temporary password' /var/log/mysqld.log
mysql_secure_installation
以上是安装mysql的基本步骤,可能还需要根据实际情况进行一些调整和优化。
阅读全文