The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL / PHPMyAdmin Database Error Exporting & Importing

Discussion in 'Database Discussions' started by jerdoggmckoy, Nov 2, 2013.

  1. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Hello, sometime recently, I started getting an error message when importing an sql database using PHPMyAdmin. When I go in and export the sql database through PHPMyAdmin, I just select the database I want, hit the export tab, choose custom & then tick the Add Drop Table and then I save the exported database.

    Then, just to repeat the error, I go in and drop all the tables. Then when I go to import the database, I get the error message I'm posting below.

    A couple of notes before I post the error:

    • When I view my PHP Info on the website, it says I'm using PHP Version 5.2.17, which is correct since that's what I've selected when compiling EasyApache
    • When my 'sql' export file downloads, it says I'm using PHP Version 5.3.17
    • I also just found out that if I export my sql database using SSH, and then import the database using PHPMyAdmin, everything appears to have worked just fine. So it appears the error is with the database exporting currently.

    Error Message:

    Error
    There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:
    ----BEGIN CUT----
    eNo1zbEKwjAYBGCh2/8U9wAxNKlByBZKqEKaxKRWcBWHQskm6NubCt54fNzZlELS6AV6CWe9hoCE
    EJSnWjdE4ydfnIbiindy/1hXuuaEkBnMYP3EMNsKb0vBGO5n50ylLcXRaBx4yxXFU9wMC3lb6bg4
    wi3l9SZn/KDxLPQ7oGb3zxcWUiEE
    ----END CUT----
    ----BEGIN RAW----

    ERROR: C1 C2 LEN: 1 2 11
    STR:

    MySQL: 5.5.32-cll
    USR OS, AGENT, VER: Win MOZILLA 5.0
    PMA: 4.0.5
    PHP VER,OS: 5.3.17 Linux
    LANG: en
    SQL:

    ----END RAW----

    SQL query:


    MySQL said: Documentation
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    Thanks in advance for any help!
     
    #1 jerdoggmckoy, Nov 2, 2013
    Last edited: Nov 2, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    It's normal to see a different PHP version in phpMyAdmin because it uses it's own internal PHP that is separate from the PHP used with Apache. As for the error message, could you let us know how large the database is? It's sometimes preferred to use the command line for larger databases.

    Thank you.
     
  3. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Thanks for the help. The database in question is only 747kb. Any other things I could try looking at? Again, I appreciate the help!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. monarobase

    monarobase Well-Known Member

    Joined:
    Jan 26, 2010
    Messages:
    503
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    France
    cPanel Access Level:
    Root Administrator
    I noticed the same thing a short time ago. I think its something to do with phpymyadmin adding extra lines as although there is the error all the data is imported correctly. Next time it happens I'll examine the imported file a bit closer
     
  6. monarobase

    monarobase Well-Known Member

    Joined:
    Jan 26, 2010
    Messages:
    503
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    France
    cPanel Access Level:
    Root Administrator
    I've just openend an export of a database with textmate and it shows the file contains something after the last line that won't be pasted here, seems like invisible characters at the end of the file that aren't compatible during the import.

    In vim the filal lines are :

    Code:
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    ^C^@^@^@^@^@^@^@^@^@
    The line causing the problem is :

    Code:
    ^C^@^@^@^@^@^@^@^@^@
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you let us know which version of cPanel you have installed? The issue you described should have been resolved in phpMyAdmin 4.0.8, which is available in cPanel version 11.40.

    Thank you.
     
  8. monarobase

    monarobase Well-Known Member

    Joined:
    Jan 26, 2010
    Messages:
    503
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    France
    cPanel Access Level:
    Root Administrator
    11.38 :)

    It's not an important issue as no customers have had problems so far. We will upgrade to 11.40 when it goes to the stable branch.
     
Loading...

Share This Page