Centos7安装mysql8.0和日常命令
Centos7安装mysql8.0
rpm -qa|grep mysql |
|
wget http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm |
yum install mysql-server |
systemctl list-unit-files|grep mysqld |
systemctl enable mysqld.service |
查看是否启动MySQL服务 |
chown -R mysql /var/lib/mysql |
mysqld --initialize |
grep 'temporary password' /var/log/mysqld.log |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码'; |
alter user 'root'@'localhost' identified by '12345678'; |
create user 'yuanweile'@'%' identified with mysql_native_password by '@@@000TrojanYWL000@@@'; |
grant select,update on trojanywl.* to 'yuanweile'@'%'; |
SHOW GRANTS FOR 'yuanweile'@'%'; |
set global validate_password.policy=0; |
use mysql; |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Anthony's Blog!
评论