欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

CentOS7中安装mysql遇见的问题及解决方案

程序员文章站 2022-06-26 17:58:50
CentOS7中安装mysql遇见的问题及解决方案1. 问题一:error: log-error set to '/usr/local/mysql/softtware/logs/mysqld.log', however file don't exists. Create writable for user 'mysql'.解决方案:首先检查my.cnf配置的路径是是否正确如果正确则进行如下操作cd /usr/local/software/mysql echo "" > /us...

CentOS7中安装mysql遇见的问题及解决方案

问题一:

error: log-error set to '/usr/local/mysql/softtware/logs/mysqld.log', however file don't exists. Create writable for user 'mysql'.

解决方案:

  • 首先检查my.cnf配置的路径是是否正确
  • 如果正确则进行如下操作
cd  /usr/local/software/mysql 
echo "" > /usr/local/software/mysql/logs/mysqld.log
chown -R mysql:mysql /usr/local/software/mysql/logs/mysqld.log
service mysqld start

启动成功!

问题二:

Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) "

解决方案:

#建立软连接
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

本文地址:https://blog.csdn.net/TQ20160412/article/details/111914499