当前位置:   article > 正文

mysql安装程序是未知文件,MySQL:未知变量,无法运行任何MySQL应用程序,与my.cnf无关...

mysql: unknown variable, 无法运行任何mysql应用程序,似乎与my.cnf无关

My problem is that, when trying to run MYSQL on Fedora, I am faced with the following error:

mysql: unknown variable 'max_connections=40'

It does the exact same thing for any other of the commands, such as mysqldump, mysqlcheck etc etc

The my.cnf file reads the following, though I've renamed it and the error still occurs. It almost seems like it's a system variable that I am unable to edit without running mysql, thus the catch 22!

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

I've also of course checked the system for any other my.cnf files.

I'm really lost and starting to tear my hair out. Any help would be greatly appreciated! :)

Thanks

Matt

解决方案

assuming that your good configuration file is /etc/my.cnf (which may not be), edit your mysql init file and add --init-file /etc/my.cnf to the mysqld command to make sure that it is indeed reading from the the init file that you think it is reading from.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/912521?site
推荐阅读
相关标签
  

闽ICP备14008679号