MySQL when importing large database, error Error 2006 (HY000): MySQL server has gone away

Source: Internet
Author: User

Or, the error message:


ERROR 2005 (HY000): Unknown MySQL Server Host ' 10997107101114 ' (0)
ERROR:
Can ' t connect to the server

No connection. Trying to reconnect ...

=======================

Workaround:

Mysql> show global variables like ' max_allowed_packet ';

mysql> set global max_allowed_packet=1024*1024*16;

Mysql> show global variables like ' max_allowed_packet ';

=======================

Unknown command ' \ n ' This error occurs when importing a database, does it matter?

DOS Error error at line xxx:unknown command ' \ n ';

This situation is generally caused by the wrong character set, if the database is UTF8 encoded, then
When MySQL is imported
MYSQL-UROOT-PPASSWD <d:\aa.sql--default-character-set=utf8
Also if the database is GBK, the import
MYSQL-UROOT-PPASSWD <d:\aa.sql--DEFAULT-CHARACTER-SET=GBK

MySQL when importing large database, error Error 2006 (HY000): MySQL server has gone away

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.