'<! - PMA-SQL-ERROR & # 8594; on db import

I am trying to import my database into a new one, but I am getting the following error:

1064 - You have an error in your SQL syntax; check the manual corresponding to your MySQL server version for the correct syntax to use next to<!-- PMA-SQL-ERROR -->

 <div class="error"><h1>Error</h1>

      

SQL query

on line 1

The error in the exported file:

<!-- PMA-SQL-ERROR -->
    <div class="error"><h1>Error</h1>
<p><strong>SQL query:</strong>
<a       href="tbl_sql.php?sql_query=SHOW+TABLE+STATUS+FROM+%60addcart138an%60+LIKE+%2    7zen_categories%27&amp;show_query=1&amp;db=addcart138an&    amp;table=zen_categories&amp;token=ed1d79622b85c64e6353225dce5738e8"><span     class="nowrap"><img     src="themes/dot.gif" title="Edit" alt="Edit"     class="icon ic_b_edit" /> Edit</span></a>    </p>
<p>
<span class="syntax"><span class="inner_sql"><a href="./url.php?url=http    %3A%2F    %2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Fshow.html&amp;token=ed1d79622b85    c64e6353225dce5738e8" target="mysql_doc"><span class="syntax_alpha     syntax_alpha_reservedWord">SHOW</span></a>  <span class="syntax_alpha     syntax_alpha_reservedWord">TABLE</span>  <span class="syntax_alpha         syntax_alpha_reservedWord">STATUS</span>  <span class="syntax_alpha     syntax_alpha_reservedWord">FROM</span>  <span class="syntax_quote     syntax_quote_backtick">`addcart138an`</span>  <a href="./url.php?url=http    %3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Fstring-comparison-    functions.html%23operator_like&amp;token=ed1d79622b85c64e6353225dce5738e8"     target="mysql_doc"><span class="syntax_alpha     syntax_alpha_reservedWord">LIKE</span></a>  <span class="syntax_quote     syntax_quote_single">'zen_categories'</span></span></span>
</p>
<p>
    <strong>MySQL said: </strong><a href="./url.php?url=http%3A%2F    %2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Ferror-messages-    server.html&amp;token=ed1d79622b85c64e6353225dce5738e8"     target="mysql_doc"><img src="themes/dot.gif" title="Documentation"     alt="Documentation" class="icon ic_b_help" /></a>
</p>
<code>
#2006 - MySQL server has gone away
</code><br />
</div>

      

I tried to export the first db again and also tried to change the settings for export, but I still get the same error.

When I open the sql file I can see the error code is at the bottom of the page, when I delete I don't get an error but only some of the db tables are imported.

I tried looking for an answer, however the only relevant question I have found has no answers.

+3


source to share


4 answers


I ran into this problem while exporting a database and based the solution to this error. This error came from a lot of data in your database tables and less php execution time. To fix this, go to your hosting account as I have a hosting account -> cpanel and then under Files click Back and Resort and get a mysql database backup. It will show you all downloadable databases. Click on the database to download the zip file, for example yourdatabase.sql.gz. It is a compact and lightweight (in terms of size) package. on upload, extract it and import it to phpmyadmin.



thank

+9


source


  • just open the sql backup file in any text editor
  • find <!-- PMA-SQL-ERROR --> <div class="error"><h1>Error</h1>

    (maybe this code at the end of the file)
  • remove all non sql code from sql file
  • Save file


can help someone.

+4


source


Ok, so I don't know what happened, but today I tried again (about a week later) and it worked. Although I noticed that the sql file I downloaded today was quite large (just over 21MB), so I thought it might have something to do with it. Maybe the server was already loaded by other users on that particular day, and maybe my hosting changed something. I really don't know, but for anyone who is facing a similar problem, I would suggest contacting their hosting service, I am pretty sure it will help, and this is what I was going to do if the db did not load correctly today. Good day to all:)

0


source


This error occurs if you have a problem exporting your database. This means your sql file is not exporting properly. So it's better to export your database in parts, for example, 5 tables each.

0


source







All Articles