将我的636MB数据库导入Wampserver时,出现以下错误。有趣的是我的最大执行时间设置为5000(php.ini)。我也尝试了许多导入方法和压缩类型都具有相同的结果:MySql控制台,PhpMyAdmin控制台,BigDump,zip,gzip,最后使用config.inc.php上传指定的目录。感谢您的帮助和建议。建议。
当前设置:
的的php.ini:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
的的config.inc.php:
//以秒为单位的最长执行时间(0表示无限制)
$ cfg ['ExecTimeLimit'] = 0;
的的my.ini:
max_allowed_packet = 200M
MySQL said:
1064 - Erreur de syntaxe près de '<br />
Fatal error: Maximum execution time of 300 seconds exceeded in <b' Ã la ligne 141
Error
SQL query:
INSERT INTO `log_url_info` (`url_id`, `url`, `referer`) VALUES
(2287337, 'http://www.website12345.com/sendfriend/product/send/id/44894/', NULL),
(2287338, 'http://www.website12345.com/sendfriend/product/send/id/44894/', NULL),
(2287339, 'http://www.website12345.com/sendfriend/product/send/id/44894/', NULL),
(2287340, 'http://www.website12345.com/catalog/category/view/id/66', NULL),
(2287341, 'http://www.website12345.com/catalog/category/view/id/718?multi_select_color_filter=2040', NULL),
(2287342, 'http://www.website12345.com/catalog/category/view/id/879?price=1000-2000', NULL),
(2287343, 'http://www.website12345.com/catalog/category/view/id/152?
limit=15&manufacturer=351&mode=list&multi_select_finish_filter=2602&multi_select_material_filter=2060&price=-1000', NULL),
(2287344, 'http://www.website12345.com/sendfriend/product/send/id/30583/', NULL),
(2287345, 'http://www.website12345.com/catalog/category/view/id/673?multi_select_finish_filter=2025', NULL),
(2287346, 'ht[...]
答案 0 :(得分:1)
您的SQL查询似乎有一些语法错误,请先尝试检查。
我已设法使用命令行导入800mb数据库。
<强>尝试强>:
mysql -p -u username -h 127.0.0.1 database < database.sql
让我知道它是否有效。
答案 1 :(得分:0)
phpMyAdmin的max_execution_time
现在由位于
\wamp\alias\phpmyadmin.conf
WAMPServer 2.5版
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#
<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
注意使用这4个参数
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
您可能需要修改upload_max_filesize
和max_execution_time
根据需要修改然后重新启动Apache
left click wampmanager -> Apache -> Service _Restart Service
现在PHP在运行phpMyAdmin时会注意这些新参数。
答案 2 :(得分:0)
解决了!我不得不截断&amp;优化日志表并选择&#34;禁用外键检查&#34;出口时并导入数据库!无需其他更改。