Constant #1064 error on everything I do in mySQL through phpMyAdmin

前端 未结 5 1312
情深已故
情深已故 2020-12-20 01:31

1064 - You have an error in your SQL syntax

I\'ve just done a fresh install of XAMPP and configured the usernames and passwords for ph

相关标签:
5条回答
  • 2020-12-20 01:42

    What fixed it for me was:

    1. go to table operations (where u clone or rename a table)
    2. click on repair table (right side in table maintenance section)
    

    EDIT:

    actually what the problem is for me is lowercase table name and I used a uppercase select query ..

    0 讨论(0)
  • 2020-12-20 01:50

    Go to the table phpmyadmin->pma_table_uiperfs delete the rows that contains your table name. delete cookies, restart mysql engine.

    0 讨论(0)
  • 2020-12-20 02:02

    you have missed the name of your table in all queries

          SELECT MAX( version ) FROM your_table 
                                        ^^-----your_table_here
    

    and you dont have to include database or table in where clause . you need to learn the basics of select query.

    0 讨论(0)
  • 2020-12-20 02:04

    I have seen this problem on a couple of my students' machines, this year, while trying to teach them some basic SQL using XAMPP with PHPMyAdmin as an introductory user interface.

    It seemed from the error message that PMA was appending nonsense SQL onto the end of the SQL statements when trying to open certain tables, even when clicking on their name in the sidebar.

    Dropping the database and re-creating it didn't help, and unfortunately no obvious answers were forthcoming on my Google search.

    After determining that the problem was PMA related, and likely related to user-specific configurations, I did a little digging around in the phpmyadmin database.

    I found the nonsense SQL that was being appended to the queries in a row in the phpmyadmin.pma_table_uiprefs which associated the problem with my student's username, and the specific database and table name that was causing her the trouble. Jackpot! I deleted this row.

    After deleting that row, though, I tried shutting down and restarting Apache, MySQL, even my web browser, and the problem persisted. It wasn't until a total reboot of her machine that the problem vanished. (This was a Windows machine, FWIW, YMMV.)

    Hope this helps.

    Simón Ruiz

    Canterbury

    Technology

    0 讨论(0)
  • 2020-12-20 02:04

    To everyone giving answers that have nothing to do with the question - there is an error in PHPMyAdmin itself - somehow it is storing some bad SQL and appending it to every query, resulting in the error the OP describes, which i am experiencing now as well! there is one table in particular, when i try to browse it or select from it, i get the 1064 error with notes about a query that i am not making. the part where you see ANDverifyOptionID>0 is not part of the query i am making - i am simply clicking the table and attempting to browse it:

    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 'ANDverifyOptionID>0 LIMIT 0, 30' at line 1

    i suspect something is cached in PHPMyAdmin, but have no idea where to find it and fix it.

    i have cleared cookies/restarted and no love. another user was able to view teh table with no issue - so this must be something related to a specific user account.

    Does PHPMyAdmin cache something per user that could cause this?

    0 讨论(0)
提交回复
热议问题