时间:2021-07-01 10:21:17 帮助过:5人阅读
5.安装MySQL shell> yum install mysql-community-server 6.启动MySQL服务 shell> systemctl start mysqld 7.开机启动 shell> systemctl enable mysqld shell> systemctl daemon-reload 8.修改root本地登录密码 1)查看mysql密码 shell> grep ‘temporary password‘ /var/log/mysqld.log
2)连接mysql shell> mysql -uroot -p 3)修改密码[注意:后面的分号一定要跟上] mysql> ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘MyNewPass4!‘; 或者: mysql> set password for ‘root‘@‘localhost‘=password(‘Wys111111!‘); mysql> show variables like ‘%password%‘; 9.添加远程登录用户 mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘Wys111111!‘ WITH GRANT OPTION;
CentOS7 安装mysql(YUM方式)
标签:etc space with mysql 远程 成功 release variable strong