I don't know why my MySQL doesn't read the my.cnf file.
I wrote a commented line # skip-networking
on my.cnf, restarted mysqld and when exec
#ps aux | grep mysql
returns:
root 7737 0.0 0.0 7184 812 pts/4 S+ 12:20 0:00 grep mysql
root 14180 0.0 0.1 10764 1280 ? S Feb04 0:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables --skip-networking
mysql 14293 0.3 3.7 396884 39364 ? Sl Feb04 15:27 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --skip-grant-tables --skip-networking --log-error=/var/lib/mysql/####.err --pid-file=/var/lib/mysql/####.pid
I understand the parameter –skip-networking could not be passed to MySQL if it is commented on my.cnf.
Any help would be appreciated.
Thanks and sorry for my English
Alvaro Canepa
Best Answer
There are a few options; perhaps that directive is in the file more than once and you only commented one instance. Perhaps the startup command adds the directive, perhaps it's pulling from more than one config file.
Can you verify that the initscript is using the config file that you want it to, by changing another directive, restarting and checking whether your change takes effect? (perhaps using 'show global variables').
Then check your startup script (/etc/init.d/mysqld?) and then grep your entire config file(s) for the directive 'skip-networking'. Unfortunately, mysql doesn't tell you where a particular part of the runtime config came from. But it looks in /etc/my.cnf, /my.cnf and ./my.cnf, in that order, by default.