Issue
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
Solution
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.
Answered By - johnshen64 Answer Checked By - Mary Flores (WPSolving Volunteer)