Mysql:未知变量,无法运行任何mysql应用程序,与my.cnf无关 [英] Mysql: unknown variable, can't run any mysql applications, doesn't seem to be to do with my.cnf
问题描述
我的问题是,当尝试在Fedora上运行MYSQL时,遇到以下错误:
My problem is that, when trying to run MYSQL on Fedora, I am faced with the following error:
mysql:未知变量'max_connections = 40'
mysql: unknown variable 'max_connections=40'
它对其他任何命令都执行完全相同的操作,例如mysqldump,mysqlcheck等
It does the exact same thing for any other of the commands, such as mysqldump, mysqlcheck etc etc
my.cnf文件读取以下内容,尽管我已将其重命名,但仍会发生错误.似乎这是一个系统变量,如果不运行mysql便无法编辑,因此请注意22 !!
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
我当然也检查了系统是否存在其他my.cnf文件.
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! :)
谢谢
马特
推荐答案
假设您的良好配置文件是/etc/my.cnf(可能不是),编辑mysql初始化文件并添加--init-file/etc/my.cnf到mysqld命令,以确保它确实是从您认为正在读取的init文件中读取的.
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.
这篇关于Mysql:未知变量,无法运行任何mysql应用程序,与my.cnf无关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!