Where to find my.cnf Mysql 5

janton

Verified User
Joined
Sep 17, 2009
Messages
145
Hello,

i got this error:
Warning: Got a packet bigger than 'max_allowed_packet' bytes query: INSERT INTO......etc.

No i read on the net i need to adjust max_allowed_packet in my my.cnf
Only after:
-bash-3.2# find / -name my.cnf
/etc/my.cnf
/usr/local/directadmin/conf/my.cnf

Both files got 2 lines... but they don't have any max_allowed_packet.


Where do i find this? what am i doing wrong.. is this because of Mysql 5? where to find the max_allowed_packet


Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.13
MySQL-client versie: 5.0.90
 
Oke.. so you mean that my Directadmin - Mysql has no standaard default settings...? i will look at the link.. but i know where it is, it's just really empty :confused:
 
Then I don't understand your question. You know where the file is and you know what you need to add to it.
 
Yes.. sorry if i wasn't clear..

I found 2 my.cnf files:
/etc/my.cnf
/usr/local/directadmin/conf/my.cnf

I though these files had some defaults already in there, but for example /etc/my.cnf:

[mysqld]
local-infile=0
bind-address = 127.0.0.1



Where is the rest? i thought i would find somethink like this:
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
wait_timeout=60
connect_timeout=10
interactive_timeout=100
join_buffer_size=1M
query_cache_size=128M
query_cache_limit=2M
max_allowed_packet=16M
table_cache=1024
sort_buffer_size=2M
read_buffer_size=2M
read_rnd_buffer_size=4M
key_buffer = 256M
key_buffer_size=64M
myisam_sort_buffer_size = 64M
thread_cache_size = 128thread_concurrency = 4
max_connections = 300



But the file doesn't have anything like this in it!
 
my.cnf is used only when you want to set something OTHER than the defaults. You do not put defaults in my.cnf. That would be redundant. Only put custom values in my.cnf.
 
Back
Top