1.启动mysql时出现Job for mysqld.service failed because the control process exited with error
mysql:Job for mysqld.service failed because the control process exited with error
2.先查看mysql的日志:tail -40f /var/log/mysql.log
mysql:Job for mysqld.service failed because the control process exited with error
红圈里面的信息是说明不能建立临时文件“/var/lib/mysql/temp/ib1GIFsS”

3.接下来是修改配置文件,指定temp的存放路径
vi /etc/my.cnf
mysql:Job for mysqld.service failed because the control process exited with error
在配置文件里面添加一句“temdir=/var/lib/mysql/temp/”,保存后退出

4.建立文件夹、授权
[[email protected] etc]# mkdir -p /var/lib/mysql/temp

[[email protected] etc]# chown mysql.mysql /var/lib/mysql/temp

/var/lib/mysql/temp的属主和属组还是root,mysql并不能在其中创建文件,后修改该目录的属主和属组

5.启动成功
mysql:Job for mysqld.service failed because the control process exited with error
6.查看mysql的运行状态
mysql:Job for mysqld.service failed because the control process exited with error
————————————————
版权声明:本文为CSDN博主「xc_123」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xc_123/article/details/100518898

相关文章:

  • 2021-09-27
  • 2021-04-12
  • 2021-06-27
  • 2021-09-27
  • 2021-04-19
  • 2021-07-31
  • 2021-10-07
猜你喜欢
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-10-30
相关资源
相似解决方案