高防服务器Job for mysqld.service failed安装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即可
购买使用一诺网络国内高防服务器,可以极大降低初创企业、中小企业以及个人开发者等用户群体的整体IT使用成本,无需亲自搭建基础设施、简化了运维和管理的日常工作量,使用户能够更专注于自身的业务发展和创新。电信高防服务器低至259元/月,购买链接:https://www.enuoidc.com/vpscn.html?typeid=5