美文网首页
CentOS 7安装MySql5.7问题

CentOS 7安装MySql5.7问题

作者: 冷煖自知 | 来源:发表于2018-07-31 16:48 被阅读48次
  • 报错Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.需要在/etc/my.cnf中添加
[mysqld]
user=mysql # 使用mysql用户
  • 报错Access denied for user 'root'@'localhost' (using password:YES),需要修改密码
    首先配置/etc/my.cnf中添加
[mysqld]
skip-grant-tables=1# 略过密码验证

然后systemctl restart mysqld重启后进入mysql

use mysql;
update user set password=password("*******") where user="*******";  #修改密码报错
  • 在mysql命令行报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
SET PASSWORD = PASSWORD('123456');
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
flush privileges;

相关文章

网友评论

      本文标题:CentOS 7安装MySql5.7问题

      本文链接:https://www.haomeiwen.com/subject/jcmhvftx.html