1

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?

2
  • 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? – hdanniel Jul 15 '09 at 19:58
1

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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