Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2007
    Posts
    9

    Default Problem Restoring A Database

    When trying to restore a database in ssh I get the following error:

    ERROR 1153 (08S01) at line 371: Got a packet bigger than 'max_allowed_packet' bytes
    It seems that max_allowed_packet needs increasing. How do I do that?

    I am using this command:
    mysql -h localhost -u root DATABASE < DATABASE.sql

  2. #2
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    I believe the default is 1mb, you would set the value from ssh.

    mysql --max_allowed_packet=16M (or whatever value needed to run)

    If you need to load the variable all the time then simply add max_allowed_packet into my.cnf as well.

    Yep the default is 1mb:
    mysql> show variables like 'max&#37;' ;
    Last edited by jayh38; 02-24-2008 at 09:38 AM.

  3. #3
    Member
    Join Date
    Aug 2007
    Posts
    9

    Default

    When I do that I get: "Welcome to the mysql monitor." - and a load of other help info.

  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    Ahh ok..

    Then enter the mysql monitor and use this instead:

    mysql>set max_allowed_packet = 1600000;

    Verify the change before and after:
    mysql>show variables like 'max&#37;';

    ooops , thats 1.6M I showed. So edit the size as you need.
    Last edited by jayh38; 02-24-2008 at 09:52 AM.

  5. #5
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    you are very much welcome!

Similar Threads & Tags
Similar threads

  1. Restoring database
    By tickfawriver in forum Database Discussions
    Replies: 4
    Last Post: 06-03-2009, 08:06 PM
  2. Problem restoring database 'DEFAULT CHARSET=latin1'
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-14-2006, 01:30 PM
  3. Replies: 0
    Last Post: 05-29-2006, 12:31 PM
  4. Problem restoring Database
    By snadboy in forum Database Discussions
    Replies: 2
    Last Post: 05-09-2005, 05:41 AM
  5. Restoring pgsql database
    By Gnomercy in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-30-2004, 12:05 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube