简体   繁体   English

使用phpMyAdmin导入SQL文件时出错

[英]Error when importing a SQL file using phpMyAdmin

I am not proficient in MySQL and phpMyAdmin and got this error when trying to import my SQL file to a new installation of WAMP. 我不精通MySQL和phpMyAdmin,并在尝试将SQL文件导入到新安装的WAMP时收到此错误。 I was developing a joomla website on my local pc and after completion, decided to launch it online with Rochen web hosting. 我当时在本地PC上开发了一个joomla网站,完成后,我决定通过Rochen虚拟主机在线启动它。 When importing this into my Cpanel, it gave me the error below. 将其导入到我的Cpanel中时,它给了我下面的错误。

Error 错误

Static analysis: 静态分析:

  1. errors were found during analysis. 分析期间发现错误。

    A closing bracket was expected. 预期将有一个结束括号。 (near ")" at position 276) (在位置276处“)附近”)

SQL query: SQL查询:

  • Database: kwadi . 数据库: kwadi

Table structure for table iq2rf_assets : iq2rf_assets表结构:

CREATE TABLE `iq2rf_assets` 
( 
  `id` int(10) UNSIGNED NOT NULL COMMENT 'Primary Key', 
   `parent_id` int(11) NOT NULL DEFAULT '0'COMMENT 
)

MySQL said: Documentation MySQL说:文档

#1064 - You have an error in your SQL syntax; #1064您的SQL语法有误; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 14 检查与您的MariaDB服务器版本相对应的手册,以在第14行的')'附近使用正确的语法

I tried to resolve with their support but their advice was for me to upgrade my WAMP Server on my local pc to the one that has MariaDB in it and try extract. 我尝试通过他们的支持解决问题,但是他们的建议是我将本地PC上的WAMP Server升级到其中装有MariaDB的服务器,然后尝试提取。 Now after installing the new WAMP server i am faced with the same issue when trying to import my back up db using phpmyadmin. 现在,在安装了新的WAMP服务器之后,当尝试使用phpmyadmin导入备份数据库时,我会遇到相同的问题。

It is giving me the same error. 这给了我同样的错误。 I do not know what to do. 我不知道该怎么办。

Need assistance. 需要帮助。

CREATE TABLE iq2rf_assets ( id int(10) UNSIGNED NOT NULL COMMENT 'Primary Key', parent_id int(11) NOT NULL DEFAULT '0')

You do not have a comment on the second field (parent_id), yet you are using the keyword "COMMENT" only to be closing the query after that. 您没有在第二个字段(parent_id)上发表评论,但是您使用关键字“ COMMENT”只是在此之后关闭查询。 Remove it and you're good to go 删除它就可以了

The assets table has more fields than the 2 fields shown in your post. 资产表中的字段比帖子中显示的2个字段更多。 This is the reason for the failed import, check your export. 这是导入失败的原因,请检查您的导出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM