Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to set the max_allowed_packet setting for mysql (5.1.31) which is running on Solaris 10.

Unfortunately mysql does not seem to read the my.cfg. I tried to place it in /etc/mycfg, /opt/mysql/mysql/data/my.cfg and in /opt/mysql/mysql/support-files/my.cfg.

At each of these locations, the max_allowed_packet does not get set when i check with:

`select @@max_allowed_packet;`

When I start mysqld as such it does set the setting:

# su mysql
$ mysqld --defaults-file=/etc/my.cfg

This are the contents of my.cfg:

[mysqld]
max_allowed_packet = 50M

How can i make mysql read the config when i start it with the SMF tools?

share|improve this question
    
Could you run that with truss to see if it is opening the file? –  dezwart Jul 14 '09 at 2:48
1  
Are you sure is my.cfg and not my.cnf? –  HD. Jul 15 '09 at 19:58

2 Answers 2

up vote 1 down vote accepted

OpenCSW provides MySQL-5.0 for Solaris, and the my.cnf file is in /etc/opt/csw/mysql5/my.cnf.

share|improve this answer

Are you having trouble setting the max_allowed_packet for the client or the server process? Ideally, they should match and setting it in one place and not the other can have interesting side effects.

The exact location of the file would depend on which distribution of mysql you are running (SUN, Solaris freeware, MySQL, Home Grown, etc).

Also, I'm assuming that you're restarting the mysql daemon between changes to the configuration file and that you've got SMF figured out.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.