centos7上yum方式安装mysql

参考网址链接

下载并安装mysql的yum Repository

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

使用yum安装

yum -y install mysql57-community-release-el7-10.noarch.rpm

开始安装mysql服务器

yum -y install mysql-community-server

启动mysql

systemctl start  mysqld.service

查看运行状态

systemctl status mysqld.service

查看安装后的默认密码

grep "password" /var/log/mysqld.log

登陆

mysql -uroot -p

修改密码规则

set global validate_password_policy=0;
set global validate_password_length=1;

修改密码、授权所有用户可登陆root

ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
-- 授权所有用户都能登录root
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
上一篇:成语小秀才云开发代码 成语答题小程序源码


下一篇:centos7 搭建个人-企业私有云盘-seafile