doutai1509 2017-03-11 15:33
浏览 106

大型SQL数据库包含如何处理和导入的语法错误

I have a .sql file created by wordpress but my wordpress site is removed. I have that file left and I want to insert that .sql file into my localhost phpmyadmin to retrieve some precious posts. the sql file size is 76.4MB. I used following steps to upload to phpmyadmin:

  1. Created new database
  2. Used "import" tab and selected "Select from the web server upload directory C:\xampp\sql/" and selecting my db localhost.sql from dropdown menu (I previously saved it in directory c:\xampp\sql"

  3. Clicked on "Go" and it took a huge time.

  4. After that this error appeared :
Error
Static analysis:

3 errors were found during analysis.

Unexpected character. (near ":" at position 60)
Unexpected character. (near ":" at position 1331)
Unrecognized statement type. (near "div" at position 7)
SQL query:

<! <div class="error"><h1>Error</h1> <p><strong>SQL query:</strong> <a

href="tbl_sql.php?sql_query=SHOW+TABLE+STATUS+FROM+%60science1_skddb1%60+LIKE+%27wp_term_relationships%27&show_query=1&db=&table=wp_term_relationships&token=2e9a4a0af3236e955c1ab3f62da2e8b4"> Edit

SHOW TABLE STATUS FROM science1_skddb1 LIKE 'wp_term_relationships'

MySQL said:


MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax

to use near '

Error

SQL query:

The problem is that I cannot open a huge file in notepad and remove the syntax errors manually. What should I do now I want to import that database and retrieve some info.

  • 写回答

1条回答 默认 最新

  • douyi6755 2017-03-11 15:42
    关注

    I'm pretty sure most decent code editors can handle 73mb files without trouble unless you are running on a very old machine. I would try komodo edit or sublime and see if they can handle. If that doesn't work, assuming you are working on a linux machine you can upload it to the server and edit using vim, that can handle it no problem.

    Your error data presented is a little confusing though...did you urldecode the sql query from the table data? Maybe I'm reading it wrong but your input doesn't care about syntax of urlencoded data, its the query that matters.

    Also, I'm sure phpmyadmin has settings that can be adjusted during import, you might want to look into that.

    评论

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用