mysql not using the /etc/init.d/my.cnf file - Please help, I'm desperate! :)
Edit: Oops... The title is all wrong, I sound like a total newbie :) It should say "mysql not using the /etc/mysql/my.cnf file". Sorry!
Please forgive me if this is not the right forum for this.
I've recently installed MySQL 5.1.37-community and migrated some databases from a previous MySQL version to the new one.
Now, all this has been working just fine. The other day I decided I wanted to try and fine-tune some of the configuration settings, so I started looking for the my.cnf file. Well, there was no my.cnf to be found anywhere. I looked in all the obvious places. So I guess somehow MySQL must be running with the default settings, and there really is no my.cnf file installed.
So to be able to change the settings, I copied the /usr/share/mysql/my-medium.cnf file to /etc/my.cnf . I then did "/etc/init.d/mysql reload", but it seems it just didn't pick up the config file. I tried changing the ownership to "mysql" and moving it into the /etc/mysql folder which apparently is more appropriate for this version of MySQL, but it still won't pick up the file.
# ll -d /etc/mysql/
drwxr-xr-x 2 mysql mysql 4096 Sep 16 06:33 /etc/mysql/
# ll /etc/mysql/
-rw-r--r-- 1 mysql mysql 4993 Sep 16 03:20 my.cnf
# more /etc/mysql/my.cnf | grep max_connections
max_connections = 475
# /etc/init.d/mysql reload
Reloading service MySQL [ OK ]
# mysqladmin -p variables | grep max_connections
| max_connections | 151 |
The OS is RHEL4 ... (Yes, I know a bit old.)
Please help if you can, I'm getting desperate!
I think you cant load configuration file(my.cnf) at reload and check your startup script which path defined for my.cnf
I thought that was the whole point of reload - to reload the configuration file?
As for the path for my.cnf, I think mysqld is hardcoded to look for my.cnf in ccertain locations, such as in /etc/ and /etc/mysql/ ?
Anyway, I just did a "/etc/init.d/mysql restart" instead of a "reload", and then it finally picked up my my.cnf file! So it looks like you are definitely right that "reload" is no good. Thanks for your help!
|All times are GMT -5. The time now is 08:39 AM.|