I used php + excel to import mysql data to excel. I have a total of 351901 data records in excel, but why is there only 16000 data records imported to the database each time, the remaining data must be re-imported. how can I set the number of imported items ., Here is a stupid way to import your ex excel into mysql data.
I use php + excel to import mysql classes. I have a total of 351901 pieces of data in excel, but why is there only 16000 pieces of data imported to the database each time, the remaining data must be re-imported. how can I set the number of imported items.
------ Solution --------------------
Here is a stupid method:
Divide your excel file into N files, each of which should not exceed 16000 lines. import files one by one
------ Solution --------------------
You need to see what causes the interruption.
Is there a processing limit for your excel class?
Is your php memory too large?
------ Solution --------------------
Database import size settings? Is mysql 2 M by default?
------ Solution --------------------
It is estimated that your php execution times out.
------ Solution --------------------
Add set_time_limit (0) to the first line on the php page.
------ Solution --------------------
It is not ruled out that 16,001st data entries are faulty.
------ Solution --------------------
I personally think it is a problem with mysql settings, and the number of imports is limited.
We recommend that you use sqlyog or other navicat to import data. Very convenient.
------ Solution --------------------
Check whether the execution time of your SQL statement times out by default.
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