当前位置:   article > 正文

mysql( 5.7.44)rpm安装(centos)_rpm安装mysql5.7.44

rpm安装mysql5.7.44

https://dev.mysql.com/downloads/mysql/

在这里插入图片描述
cd /tmp
mkdir mysql
cd mysql
ls -l
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.44-1.el7.x86_64.rpm (下载相关依赖包)
在这里插入图片描述
ls -l
rpm -ivh (安装相关.rpm安装包)
rpm -ivh mysql-community-common-5.7.44-1.el7.x86_64.rpm
rpm -qa | grep mysql (查看common是否安装成功)
在这里插入图片描述
sudo yum install ncurses-compat-libs (安装缺少的依赖项: 使用该命令安装 libncurses 和 libtinfo 库)
rpm -ivh mysql-community-client-5.7.44-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.44-1.el7.x86_64.rpm
rpm -qa | grep mysql

systemctl status mysqld.service
systemctl start mysqld.service
systemctl status mysqld.service
grep -nw 'A temporary password is generated for root@localhost:' /var/log/mysqld.log // 精确匹配

mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_new_password';
FLUSH PRIVILEGES;
exit;

// firewalld:适用于基于 CentOS
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
  • 1
  • 2
  • 3

sudo systemctl enable mysqld // centos 开机自启动

ref

  • https://blog.csdn.net/Coin_Collecter/article/details/130095380
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/639953
推荐阅读
相关标签
  

闽ICP备14008679号