赞
踩
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
sudo systemctl enable mysqld // centos 开机自启动
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。