Solution to various errors reported during 6 GB database import _ MySQL

Source: Internet
Author: User
6 GB database import reports various errors solution bitsCN.com Tool selection
I. Sqlyog is a powerful tool, but in the face of a 5G database, it can only strike, simply put, the local import can be, from the local import server can not.
II. Phpadmin comes with this, but it's okay, but it's never used in the end, because it's invisible, because up to 50 MB, although you can modify the configuration file to upload but 5 GB, forget it, no confidence.
3. Another is a PHP script. It seems to be written by Germans. This is also the import of data. how can this problem be solved? I did not test it successfully. However, I had a good reputation on the internet. 5G data was unsuccessful. this was the second day of the competition.
4. I also used database segmentation and import, each of which is 100 MB. It cannot be smaller... If more than 60 SQL statements are separated, various errors are reported. This tool also failed. If you want to use it, go online and look for mysql splitting.

The following figure shows the imported image,
The GZ compression type is 4.52 GB after being decompressed. Import the data to the database and it becomes 6.6G .....

Finally, use commands to import them.
Mysql-uroot-p shujukuming
Let's talk about the error.
Simply put, all kinds of errors can be encountered.
Error 1
ERROR 5 (HY000) at line 318: Out of memory (Needed 1681784 bytes)

This error can be reported many times by using-f, which roughly means that the memory is insufficient,
Solution: mysql-uroot-p shujukuming-f If you don't mind losing a few pieces of data, use the above method.

Error 2
ERROR 1062 (23000) at line 30: Duplicate entry '1' for key 'primary'
This error indicates a key-value error.
Solution: data in the data table needs to be cleared online, but the primary key and partition cannot be used at the same time when data partitions are used. just change the primary key.

Error 3
Mysql error nr.2006-mysql server has gone away
This error is caused by upload restrictions. you need to modify the configuration file.
The configuration file is called my. conf in linx and my. ini in windows.
You must be careful when modifying the content.
Simply modify several configurations.

Max_allowed_packet = 166666 m. This is the limit on the file size. because we need to upload 6 GB, it should be enough to change it to 1111111 MB.
Wait_timeout = 288000000 wait timeout .. Let's take a look. I added several zeros to the back...
Interactive_timeout = 288000000 running timeout .... Let's take a look. I added several zeros to the back...

Do not modify other configuration files except a few. restart the server.

Error 4
This is a very low-level error.
The version of mysql is incorrect. Currently, more than 5.0 is popular.
Note that a later version cannot be imported into a lower version, and a later version cannot be imported to a later version than 5.5. some query statements cannot be imported to a later version.

Repost Please indicate the source Thank you http://skss.blog.163.com/

The above are my various problems. if you have any other questions, please give me more advice. after all, the SQL statements for 6 GB files cannot be opened to bitsCN.com.

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.