Got a packet bigger than 'max_allowed_packet' error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zensunni
    New Member
    • May 2007
    • 101

    Got a packet bigger than 'max_allowed_packet' error

    Okay...

    I got this error, so I thought, fine, I'll change the max_allowed_pac ket variable.

    So, I went to the documentation, and found this
    http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html

    But, the command it gives you for changing the packet size variable doesn't work.

    This command:
    Code:
    mysqld --max_allowed_packet=32M
    gives me the "command not found" error.

    So, I figured I would find the file (/etc/init.d) and go like this:

    Code:
    ./mysqld --max_allowed_packet=32M
    But that just gives me the "usage ./mysqld {star|stop|stat us|etc}" error.

    But if I do this:
    Code:
    ./mysqld start --max_allowed_packet=32M
    It won't take in the argument for max_allowed_pac ket, because I can spell the variable wrong and it doesn't give me an error.

    This is getting pretty frustrating. Anyone know how I can change the server variable "max_allowed_pa cket"?
  • zensunni
    New Member
    • May 2007
    • 101

    #2
    I found an alternative.

    1. Edit the file "/etc/my.cnf":
    Under "[mysqld]", enter "max_allowed_pa cket=100000000M "

    2. Then use command:
    mysql -p'<password>' --max_allowed_pac ket=10000000M <database_nam e> < "/home/<user>/Desktop/<upload_file>.s ql"

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Yea. But after changing it in the my.cnf file and restarting the MySQL server, it shouldn't be necessary to add the parameter to the mysql command.

      Glad you found a solution tho.
      Thanks for sharing it.

      Comment

      Working...