Excel importing MySQL data problem
I use the Php+excel import MySQL class, I Excel total 351,901 pieces of data, but why each import into the database only 16,000 data, the remaining data will be re-imported to go in, how to set the number of imported bar.
------Solution--------------------
Give you a stupid way:
Divide your Excel into n files, no more than 16000 lines per file. Import by file
------Solution--------------------
You need to see what the cause of the interruption is.
Does your Excel class handle the upper limit?
Is your PHP taking up too much memory?
------Solution--------------------
Database Import size settings? MySQL default is 2M?
------Solution--------------------
It's estimated that your PHP execution timed out.
------Solution--------------------
Add Set_time_limit (0) This on the first line of the PHP page
------Solution--------------------
No problem with the data in section 16,001th
------Solution--------------------
Personally, the number of imports is limited by the MySQL setup problem.
It is also recommended that you use SQLyog or other navicat to import. Very convenient.
------Solution--------------------
You have to look at your SQL statement default execution time, is not timed out
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.