{"id":1419,"date":"2019-02-08T10:36:03","date_gmt":"2019-02-08T10:36:03","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2019\/02\/08\/1583555-how-to-fix-the-mysql-1064-error-at-hostinger\/"},"modified":"2026-03-16T12:12:16","modified_gmt":"2026-03-16T12:12:16","slug":"1583555-how-to-fix-the-mysql-1064-error-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/1583555-how-to-fix-the-mysql-1064-error-at-hostinger\/","title":{"rendered":"How to Fix the MySQL 1064 Error at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">The <b>&ldquo;#1064 &ndash; You have an error in your SQL syntax&rdquo;<\/b> error indicates a syntax error in the SQL query statement. Since this may be due to a few different reasons, here are the most common ones and how to fix them:<\/p><ul>\n<li>\n<p class=\"no-margin\"><b>Missing data<\/b> &ndash; your database may have missing data. Double-check that your database has all the data it needs to complete the query<\/p>\n<p class=\"no-margin\">\n<\/p><\/li>\n<li>\n<p class=\"no-margin\"><b>Command mistyping<\/b> &ndash; If you entered the import command or any other manually, verify that it is spelled correctly in a SQL statement<\/p>\n<p class=\"no-margin\">\n<\/p><\/li>\n<li>\n<p class=\"no-margin\"><b>Obsolete commands <\/b>&ndash; some commands might be deprecated, meaning that they are no longer valid in the SQL statement<\/p>\n<p class=\"no-margin\">\n<\/p><\/li>\n<li>\n<p class=\"no-margin\"><b>Database version mismatch<\/b> &ndash; different MySQL versions have different reserved words. If you are using a previous version from when a word was not reserved, it can cause this error. To fix it, <b><a href=\"\/support\/1583545-how-to-access-phpmyadmin-at-hostinger\" target=\"_blank\" class=\"intercom-content-link\">access your database via phpMyadmin<\/a><\/b> and<b> <\/b>select the <b>Import<\/b> tab on the top selection bar:<\/p>\n<p class=\"no-margin\">\n<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/b464196d-8dfd-4d47-8ac1-6fd76266250f.jpg\"><\/div>\n<p class=\"no-margin\">Next, locate the <b>Format-specific options<\/b> field and select the target database version from the <b>SQL compatibility mode<\/b> drop-down box:<\/p>\n<\/li>\n<\/ul><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/7ab4d353-6cf0-44ab-b931-459f4adcf7ca.jpg\"><\/div><h2 id=\"h_e9e19d0c9f\">What to Do if the Issue Persists<\/h2><p class=\"no-margin\">If you are <b><a href=\"\/support\/1884149-how-to-import-a-database-with-phpmyadmin\" target=\"_blank\" class=\"intercom-content-link\">importing a database<\/a><\/b> and the error still appears after using compatibility mode, or you are getting an <b>ERROR: ASCII &lsquo; &rsquo; <\/b>message,<b> <\/b>you can try the following:<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #feedaf80;border-color: #fbc91633\">\n<p class=\"no-margin\"><b>Create a backup copy<\/b> of your database file before making any changes<\/p>\n<\/div><ol>\n<li>\n<p class=\"no-margin\">Open the database file (<b>.sql<\/b>) using a notepad application on your device<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Delete the first and last lines on the file<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Save the changes and try re-importing again<\/p>\n<\/li>\n<\/ol><p class=\"no-margin\"><b>Additional Resources<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\"><b><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/keywords.html\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">List of Keywords and Reserved Words on MySQL 8.0<\/a><\/b><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Fixing the &#8220;#1064 &#8211; You have an error in your SQL syntax&#8221; error in phpMyAdmin<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[241],"tags":[],"class_list":["post-1419","post","type-post","status-publish","format-standard","hentry","category-database-troubleshooting"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/1583555-how-to-fix-the-mysql-1064-error-at-hostinger\/","default":1},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/1583555-comment-reparer-l-erreur-mysql-1064-chez-hostinger\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1419"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1419\/revisions"}],"predecessor-version":[{"id":5107,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1419\/revisions\/5107"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}