Php 修复将数据库导入Wampserver时发生的1064 SQL错误
在将636MB数据库导入Wampserver时,出现以下错误。有趣的是,我将最大执行时间设置为5000 in(php.ini)。我还尝试了许多导入方法和压缩类型,结果都是一样的:MySql控制台、PhpMyAdmin控制台、BigDump、zip、gzip,最后使用config.inc.php上传指定的目录。感谢您的帮助、建议和建议 当前设置:Php 修复将数据库导入Wampserver时发生的1064 SQL错误,php,mysql,database,wampserver,Php,Mysql,Database,Wampserver,在将636MB数据库导入Wampserver时,出现以下错误。有趣的是,我将最大执行时间设置为5000 in(php.ini)。我还尝试了许多导入方法和压缩类型,结果都是一样的:MySql控制台、PhpMyAdmin控制台、BigDump、zip、gzip,最后使用config.inc.php上传指定的目录。感谢您的帮助、建议和建议 当前设置: php.ini: 立柱最大尺寸=750M 上传最大文件大小=750M 最大执行时间=5000 最大输入时间=5000 内存限制=1000M confi
php.ini:
立柱最大尺寸=750M
上传最大文件大小=750M
最大执行时间=5000
最大输入时间=5000
内存限制=1000M
config.inc.php:
//以秒为单位的最大执行时间(0表示无限制)
$cfg['ExecTimeLimit']=0
my.ini:
允许的最大数据包数=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[...]
MySQL说:
1064年的今天,联合税务局(Errur de Syntax près de'致命错误:在中超过了300秒的最长执行时间。您的SQL查询似乎有一些语法错误。请尝试先检查一下 我已经使用命令行导入了一个800mb的数据库 试试看:
mysql -p -u username -h 127.0.0.1 database < database.sql
mysql-p-u用户名-h127.0.0.1数据库
让我知道它是否有效。phpMyAdmin的
最大执行时间现在由中的别名定义控制
\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>
您可能需要修改upload\u max\u filesize
和max\u execution\u time
根据需要进行修改,然后重新启动Apache
left click wampmanager -> Apache -> Service _Restart Service
现在,当您运行phpMyAdmin时,PHP将注意这些新参数。!我必须截断和优化日志表,并在导出时选择“禁用外键检查”。数据库导入了!不需要其他更改。这是两个独立的错误。您可能想先关注sql语法错误?您能给我一些关于修复这些类型的语法错误以及所有相关内容的指导吗?我不确定我们到底要开始什么?谢谢你的帮助。
left click wampmanager -> Apache -> Service _Restart Service