mysql错误退出来的_由于错误代码退出控制进程,mysqld.service的作业失败?看这里......

CentOS 7安装MySql5.7问题

mysql

报错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="*******"; #修改密码报错

报错ERROR 1054 (42S22): Unknown column 'password' in 'field list' 5.7版本下的mysql数据库下已经没有password这个字段了,password字段改成了authentication_string

update mysql.user set authentication_string=password('*******') where user='*******'; #修改密码成功

flush privileges; #立即生效

在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;

phpmyadmin

报错:配置文件现在需要一个短语密码。

在 phpMyAdmin 文件中找到一个文件“config.sample.inc.php”,这是phpMyAdmin配置文件的样本文件,我们需要把该文件复制,然后重命名为“config.inc.php”,config.inc.php是phpMyAdmin的配置文件,编辑器打开 config.inc.php 搜索下面一行代码$cfg['blowfish_secret'] = '';,将后面单引号里面随便填入个字符串即可,打开phpMyAdmin/libraries/config.default.php文件$cfg['blowfish_secret'] = '';修改为同样密码

报错:$cfg['TempDir'] (./tmp/) 读取失败且不能建立缓存, phpMyAdmin运行速度将受影响.

手动在phpmyadmin的根目录建立tmp文件,赋予读写权限即可。

-报错:mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50637···

根据安装php版本先删除php-mysqlyum remove php-mysql,然后安装php-mysqlnd,我的php事7.2所以用yum install php72w-mysqlnd

最后killall php-fpm然后再次启动php-fpm即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值