时间:2021-07-01 10:21:17 帮助过:50人阅读
检查mysql源是否安装成功
yum repolist enabled | grep "mysql.*-community.*"
看到上图所示表示安装成功。
yum install mysql-community-server
systemctl start mysqld
查看mysql启动状态
systemctl status mysqld
systemctl enable mysqld
systemctl daemon-reload
mysql安装完成之后,在/var/log/mysqld.log文件中给root生成了一个默认密码。通过下面的方式找到root默认密码,然后登录mysql进行修改:
grep ‘temporary password‘ /var/log/mysqld.log
红框位置显示临时密码
mysql -u root -p set password for ‘root‘@‘localhost‘=password(‘MyNewPass4!‘);
grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘登录密码‘ with grant option; flush privileges;
centos7 安装mysql
标签:rpm安装 lis ora unit 安装 temporary sql arc 行修改