赞
踩
一、首先关闭服务并查看服务状态
[root@dw-pd-app ~]# systemctl stop mysqld
[root@dw-pd-app ~]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disa bled)
Active: inactive (dead) since Tue 2020-12-08 18:38:07 CST; 4s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Main PID: 2569 (code=exited, status=0/SUCCESS)
Dec 08 18:38:02 dw-pd-app systemd[1]: Stopping MySQL Server…
Dec 08 18:38:07 dw-pd-app systemd[1]: Stopped MySQL Server.
Warning: Journal has been rotated since unit was started. Log output is incomplete or u navailable.
二、 编辑配置文件添加参数使无密码登录成效并重启服务
[root@dw-pd-app ~]# vi /etc/my.cnf
下最后
添加skip_grant_tables 一行,然后qw保存退出
[root@dw-pd-app ~]# systemctl start mysqld
[root@dw-pd-app ~]# systemctl status mysqld
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。