This is a discussion on my.cnf file not used by mysqld_safe in FreeBSD within the MySQL Database forums, part of the Database Forums category; Hi, I have a server with FreeBSD 4.10 and mySQL 5.0 and I'm trying to use the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I have a server with FreeBSD 4.10 and mySQL 5.0 and I'm trying to use the my-small.cnf file as my my.cnf file. I have copied and renamed it to /usr/local/mysql/my.cnf which is where my BASEDIR referes to. I have added this to the [mysqld] and [mysqld_safe] sections open_files_limit = 512 I start mysqld at startup from the rc.local file: /bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ &' I also tried only: /bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &' But if I look into mysql the open_files_limit stay a the default value, so it seems that the my.cnf file is not readed. I tried moving the my.cnf file to these directories /usr/local/mysql/data/ /usr/local/etc/ /etc/ without any results I also tried to change the owner and group of my.cnf to mysql If I have 2 copies of my.cnf in the /usr/local/mysql/ and /usr/local/mysql/data/ directories .. I get a message from mysqld at startup saying that it found 2 copies of my.cnf and will ignore the one in the /data/ directory. So it seems that mysqld is looking for the file and is looking at the right place. Very strange! If I use my_print_defaults mysql mysql_safe I get the correct values. Why mysqld is not using the open_files_limit value? So other configuration values do not match the values in my.cnf too. I spent many hours on this, and really don't know what else to try ... any help will be greatly appreciate Thanks in advance. |
|
|||
|
Ok, it seems the file is read but not every options are taken into
account (like the open_files_limit). I just tried to put my.cnf in the /etc/ directory and add this line to the file: skip-innodb When I rebooted mysql took 10Meg less RAM. It doesn't work if I put the file in the /usr/local/etc/ directory. I didn't test it in /usr/local/mysql and /usr/local/mysql/data/. I still don't understant why some options do not change anything, many of them like: sort_buffer_size net_buffer_length table_cache key_buffer_size thread_stack open_files_limit By the way anyone know if innoDB is really usefull for a small mySQL database? I would really like to free 10 megs from memory Thanks |