8.0版本:
wget http://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm
yum localinstall mysql-community-release-el7-5.noarch.rpm
或
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum repolist enabled | grep "mysql*"
# 查看mysql安装包:
yum list | grep mysql
# 查看安装包信息
yum info mysql-community-server
# 查看yum安装目录:
rpm -ql mysql-community-server
# 安装mysql:
yum install -y mysql-community-server
systemctl status mysqld #查看服务状态
systemctl start mysqld #启动服务
systemctl stop mysqld #停止服务
systemctl restart mysqld #重启服务
service mysql status
service mysql start
service mysql stop
grep 'password' /var/log/mysqld.log
alter user 'root'@'localhost' identified by 'Root_123';
flush privileges;
# 修改密码复杂度:0:LOW 1:MEDIUM 2:STRONG
set global validate_password.policy=0;
# 密码最小长度:
set global validate_password.length=6;
卸载:
systemctl stop mysqld
rpm -qa | grep mysql
rpm -qa | grep mysql | xargs rpm -e
rpm -qa | grep mysql
网友评论