Linux安装MySQL时候出现log-error set to '/var/log/mariadb/mariadb.log', however file don't exists.

Linux安装MySQL时候出现log-error set to '/var/log/mariadb/mariadb.log', however file don't exists.

你找到网上很多文章告诉你这就是个权限问题,创建文件,加上权限就解决了对不对?

实际上明明你在 my.cnf 里面配置了 log-error 的参数

[mysqld_safe]
log-error=/home/mysql/log/mysql/error.log

为什么没有生效呢?

实际上mysql 有默认的 my.cnf

mysql-5.7.8# bin/mysqld --help --verbose 2> /dev/null | grep -B 1 '/etc/my.cnf'
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf

检查下 /etc/my.cnf 的设置看看。

你可能感兴趣的:(Linux安装MySQL时候出现log-error set to '/var/log/mariadb/mariadb.log', however file don't exists.)