Simple my.cnf file question

March 18th, 2010
  • I am trying to change my setting so I can upload my db into my local server so I can keep backup's and test them out.
    MySQL version 4.1.11
    I get this error
    ERROR 1153 (08S01) at line 366: Got a packet bigger than 'max_allowed_packet' bytes

    so I want to change the max_allowed_packet

    I have edited my other server with this but this is what I get from my fresh install of Fedora Core 4


    [mysqld]
    datadir = /var/lib/mysql
    socket = /var/lib/mysql/mysql.sock
    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).
    old_passwords=1
    big-tables

    [mysql.server]
    user=mysql
    basedir=/var/lib

    [mysqld_safe]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    "my.cnf" 15L, 361C

    What file do I need to edit or what do I need to add to this file to get it working correctly?

    -Joshua


  • It should work. That's the line in my my.cnf file. Try this instead:

    max_allowed_packet = 16M


  • if I keep it like that it won't allow my mysqld server to restart.

    I am trying to import a 400 mb sql file.


  • Thanks Steve! this worked!

    It should work. That's the line in my my.cnf file. Try this instead:

    max_allowed_packet = 16M


  • Under the [mysqld] line, add this:

    set-variable = max_allowed_packet = 16M

    Assuming you want 16M of course. Restart MySQL after making this change.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Simple my.cnf file question , Please add it free.