PHPMyAdmin Error #1064 when migrating Wordpress Site - mysql

I am trying to move my Wordpress website from Hostgator to iPage host.
Normally, this is a relatively easy process, but this time it has an error. I never used iPage before, so it might be something to do with that. I have no idea of the issue right now, could it be something to do with different phpMyAdmin version? the iPage host interface seems a bit older to me.
#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 'order, tag ) VALUES ( 1, 1, 'Master', NULL, NULL, '<?php
\n\necho the_title(); \' at line 1
Any help on how to fix this issue would be greatly appreciated. Thanks in advance!

Related

Sql Syntax error with Doctrine, probably because of change of Mysql version

I've programmed a project in symfony and mysql 5.6. then I uploaded my project to a remote server on 1&1. the remote server has mysql 5.7 version. All doctrine queries run ok and without problem. But when a user searches something, a request will be sent to the server and a doctrine query will be executed. Here it returns the following error:
SQLSTATE[42000]: Syntax error or access violation: 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 'integer)
BETWEEN 1940 AND 2002) AND u0_.id <> 2' at line 1
I think, it is probably because of different versions of mysql. Because on localhost it runs without problem
Can you please help me how to solve it? is there a way to regenerate all the migrations according the new mysql version? or may be there is another solution?
thanks
I was using CAST('number' as integer) in mysql 5.6. It did ok. However in mysql 5.7 and I do not know why, it does not run ok. So I changed it to CAST('number' as UNSIGNED) and it works ok

Mysql error #1064 in Drupal

I have a problem when I upload mysql from localhost to my server. The error message show like below.
Error
Static analysis:
1 errors were found during analysis.
A closing bracket was expected. (near ")" at position 76)
SQL query:
CREATE TABLE actions ( aid varchar(255) NOT NULL DEFAULT '0'COMMENT )
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 3
enter image description here
Please help me. how to fix this error....
I just try many ways to solve mysql error. Fortunately, I found the ways to fix it. Just update phpmyadmin version in localhost to be the same at server version.
Then, it's worked for me.
Hope this way help you to solve your error when you get the same at me.

Importing database SQL syntax error in Prestashop

I'm developing a simple eshop to a French client (I'm Portuguese) at PRESTASHOP, everything went marvellous but we faced some issues when configuring the Payment System ATOS. We were using VIADUC.fr services, and due to those issues we have recently changed to OVH.
Problem: OVH offers a database, and now when I'm trying to import my database I have the following error:
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 './PaxHeaders.7074
OVH help me to find what the issue was, but can't help solve it because this "goes out of their scope", and I have really tiny experience with this.
The eshop has been delayed because of this matter and i can't delay it much longer.

Mysql syntax errors on import

I need some help with mysql errors keep popping up. Some time ago I could easily export (mainly WordPress) databases from my localhost and import these (via phpmyadmin import) on the webserver to push my websites live. Since a few days I keep getting different mysql error while importing these databases..
I tried a couple of things, changing charactersets, collate settings, ... Nothing seems to work.
I'm not a DB guy, so maybe this is something easy, but I can't seem to figure it out on my own..
Local (xampp on mac)
Databaseserver
--------------
Server: Localhost via UNIX socket
Servertype: MySQL
Serverversie: 5.6.26 - Source distribution
Protocolversie: 10
Gebruiker: root#localhost
Karakterset van server: UTF-8 Unicode (utf8)
Webserver
Databaseserver
--------------
Server: Localhost via UNIX socket
Servertype: MySQL
Serverversie: 5.5.31 - MySQL Community Server (GPL)
Protocolversie: 10
Gebruiker: t2c_projects#localhost
Karakterset van server: UTF-8 Unicode (utf8)
Can someone please help me out? I can give all the info needed, don't know which are relevant.. So anyone need additional info please let me know.
Any help is welcome!
Update1:
Errors I'm getting
#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 ''<div class="rss-widget"><ul><li><a class=\'rsswidget\' href=\'https://wordpress' at line 9
This error is from a database in development, I tried a fresh installation db import and then I'm getting this:
#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 'CREATE TABLE `wp_termmeta` ( `meta_id` bigint(20) UNSIGNED NOT NULL, `term_i' at line 11
I keep getting different syntax errors, I allready tried manually fixing these but they just keep me changing stuff so I'm trying to fix this core issue..
I have a suspicion it has something to do with mysql versions or character sets..
Update2:
So I tried fixing the first (mixed html) error, and after I removed all \' by ", I get new errors (83 errors):
#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 '2016-03-29 10:21:45', '0000-00-00 00:00:00', ' ', '', '', 'draft', 'closed', 'cl' at line 5
It simply seems that your SQL statements are mixed with HTML at some point
#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 ''<div class="rss-widget"><ul><li><a class=\'rsswidget\' href=\'https://wordpress' at line 9
If you believe that it is not the case (e.g. you insert html in rows), please add the full queries to your post, but the issue seems pretty obvious :)
Maybe that some copy/paste manipulation error led to that state.
Without checking the full statement that causes the error, can't say more at the moment..

How to find the file causing a mysql syntax error

I'm a newbie. I just set up Ubuntu to run on my Chromebook (via Crouton) last week and am currently in the process of setting up several Wordpress sites on localhost. I successfully installed a new Wordpress site yesterday, and I'm able to access the frontend and backend of the site via localhost no problem.
Today I wanted to create another Wordpress site. But when I try to create a new database in mysql using Terminal, I get the following error:
mysql> CREATE DATABASE;
ERROR 1064 (42000): 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
How do I figure out which file is causing the syntax error? I checked php.ini, which I edited yesterday, but line 1 looks fine.
The right way to use Mysql CREATE DATABASE statement
CREATE DATABASE my_db;
To my belief, you are missing the database name:
mysql>CREATE DATABASE database_name;