1.安装
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
yum -y install mysql80-community-release-el7-3.noarch.rpm
yum -y install mysql-community-server
2.数据库设置
systemctl start mysqld
systemctl status mysqld
查看密码
grep "password" /var/log/mysqld.log
mysql -u root -p
输入上面的密码
设置新密码
set global validate_password.policy=0;
set global validate_password.length=1;
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
3.开启远程
use mysql;
grant all privileges on . to 'root'@'%' identified by '123456' with grant option;
4.创建新用户
CREATE USER 'test'@'%' IDENTIFIED BY '123456';
grant all on . to 'test'@'%';
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于