Increasing mysql import size

后端 未结 3 1507
野性不改
野性不改 2021-02-11 00:22

I am trying to import a mysql file to my cpanel phpmyadmin. But I am getting this error message. \"#1153 - Got a packet bigger than \'max_allowed_packet\' bytes\"

I have

3条回答
  •  猫巷女王i
    2021-02-11 00:51

    The fix is to increase the MySQL daemon’s max_allowed_packet. You can do this to a running daemon by logging in as Super and running the following commands.

    # mysql -u admin -p
    
    mysql> set global net_buffer_length=1000000;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> set global max_allowed_packet=1000000000;
    Query OK, 0 rows affected (0.00 sec)
    

    Then to import your dump:

    gunzip < dump.sql.gz | mysql -u admin -p database
    

提交回复
热议问题