我有一个巨大的csv文件(Innodb),我必须在phpmyadmin中导入。 对于第一个(差不多20mb),它起作用了。 对于另一个(差不多50mb),当我尝试在PhpMyAdmin中导入它时出现此错误:
Fatal error: Maximum execution time of 300 seconds exceeded
我正在使用Easyphp,
的my.ini:
bind-address = 127.0.0.1
socket = "${path}/mysql/mysql.sock"
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 512M
table_open_cache = 128
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 512K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
[wampmysqld]
port = 3306
socket = /tmp/mysql.sock
key_buffer = 384M
max_allowed_packet = 100M
table_cache = 4096
sort_buffer_size = 2M
net_buffer_length = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
basedir=c:/wamp/bin/mysql/mysql5.1.36
log-error=c:/wamp/logs/mysql.log
datadir=c:/wamp/bin/mysql/mysql5.1.36/data
thread_cache_size = 8
query_cache_size = 32M
innodb_buffer_pool_size = 384M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 10M
innodb_log_buffer_size = 64M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 3600
wait_timeout = 28800
[mysqldump]
quick
max_allowed_packet = 100M
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
的php.ini
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 3600
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 5000
; Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 64
; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 2000M
我该如何解决? 感谢
答案 0 :(得分:1)
Quickfix:将CSV分成较小的部分。