标签:temporary centos7 top 重启 emctl HERE 权限 sys 必须
系统centos7,mysql5.7
1、第一次安装好mysql后的临时密码
>grep "password" /var/log/mysqld.log
显示如下:
.................A temporary password is generated for root@localhost: i8uLno2zRC+a
" i8uLno2zRC+a "此句为刚安装好之后的临时密码,第一次登陆必须要修改密码
2、第一次登陆修改密码
alter user ‘root‘@‘localhost‘ identified by ‘新密码‘;
1、忘记自己修改的密码
>vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-grant-tables ----->增加内容 ‘跳过授权检查‘
2、重启mysql服务
>systemctl stop mysqld.service
>systemctl start mysqld.service
3、进入MySQL
>mysql
mysql> update user set authentication_string=password(‘123456‘) where user=‘root‘;
1、远程链接权限
mysql>grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘你的密码‘;
标签:temporary centos7 top 重启 emctl HERE 权限 sys 必须
原文地址:https://www.cnblogs.com/minmax329/p/9403598.html