Importing database SQL syntax error in Prestashop - mysql

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.

Related

ADO Error: 0x80040e14 exception occurred in microsoft oledb provider for odbc drivers[ODBC 8.0(a)][mysqld-8.0.20] You have an error in your SQL syntax

We have built RFID based system identification application in LabView using MySQL as database.
We have one same software running on two similar computers. Few months before application was running properly on both the computers. Now one is running smoothly but the second one gives following error.
ADO error: 0x80040e14 exception occurred in microsoft ole db provider for odbc drivers [MYSQL] [ODBC 8.0(a)] [mysqld-8.0.20] You have an error in your SQL syntax; check the manual corresponds to your MySQL version for the right syntax yo user near "RFID_tag_number' at line 1 in NI_Database_API.lvlib:Conn Execute.vi...till path of the file.
As you can see there is double inverted comma before RFID_tag_number in the error, but in our code we have only used single inverted comma as it is a string value. We tried to copy complete application from the computer where it is properly running to the second computer but still getting the same error.
The only difference between both computers we found is -
In the computer running properly - In MySQL Workbench >Administrator >Server Status, the Configuration Path is My SQL Server 5.7\my.ini
And in the second computer it is My SQL Server 8.0\my.ini.
We don't know if this is the reason for the error or how the configuration path affects the application. We even tried to remove MySQL server 8.0 completely from computer with the issue and installed MySQL server 5.7 but still the path remained same.
Can anyone help us? We are new to LabView working with MySQL.
What I understand, error will throw for incorrect query,it might be required handling special characters.
Second if same data base access by both system
,system required same version my mysql and odbc driver also.
Third, when you try to remove mysql, delete hidden files in c drive then install new version

Update query suddenly stopped working after migration on Unix server

a program that worked until a few days ago today gave back the following error in Production environment :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntaz to use near', owner='user#domain', check_datetime=NOW(), WHERE id = 26922 at line 1.
the complete query is :
**UPDATE anomalie_ordini.taa_tb_overview_rapporti
SET status_rapporto_id= <val_num>, owner='<val_char>', check_datetime=NOW()
WHERE id=<val_num>**
the same query run in Development environment without problems.
Could be tied to a migration of the server where the query runs?
Hope you can help me.
Thank you.
EDIT: find the error, one of the columns were named ROWS, a reserved word (not my choice :) )

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 Workbench / Forward Engineering Progress - Error

So i have a little problem while learning MySQL/PHP.
I have installed XAMPP and the MySQL Workbench, in order to learn (play around) some basic SQL/PHP stuff.
My XAMPP shows that my SQL server is up and running (it clearly says MySQL), but nonetheless, i get an error, each time i try to implement a schema on my sql-server.
As for now, i have only used the EER/Forward Engineering method of implementing a database with the MySQL-Workbench. Each time i try to complete the process after modelling the EER model, i get errors like this:
Executing SQL script in server
ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
Does anyone here have an idea how to fix this?
Greetings.
Thats what the generated SQL looks like
I also tried setting the "Target SQL Version" in the Model preferences to 5.6, as well as overall preferences.
As a little desperation move, i deinstalled XAMPP and the MySQL Workbench, and installed the newest versions - XAMPP (7.3.8 , using MariaDB) and the Workbench (8.0.17)
What am i missing?

How to fix a MySQL syntax error when deploying a working Play application to CloudBees?

I have very simple Play application that illustrates the use of MySQL (rather than the default H2) database available here:
https://github.com/ics-software-engineering/play-example-mysql
The README file explains the steps required to run the application locally using a local installation of MySQL. It works fine locally.
I have been trying unsuccessfully to get this application to work on CloudBees. My basic strategy has been:
Use the CloudBees Play 2 ClickStart to create a sample app, db, repo, and build system.
Edit the build file to refer to my github repository.
Rebuild and redeploy.
More complete instructions on this strategy are available here.
When I go through this process, the system builds and deploys, but gets a MySQL syntax error in the application console when I attempt to retrieve the home page:
[ [37minfo [0m] play - database [default] connected at jdbc:mysql://ec2-23-21-211-172.compute-1.amazonaws.com:3306/play-example-mys
[ [31merror [0m] play - 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 'sequence page_retrieval_seq' at line 1 [ERROR:1064, SQLSTATE:42000]
Oops, cannot start the server.
#6f3k8cj6c: Database 'default' is in inconsistent state!
at play.api.db.evolutions.Evolutions$.checkEvolutionsState(Evolutions.scala:177)
This is a curious error because the syntax error "sequence page_retrieval_seq" is quite similar to one of the lines generated by Play in 1.sql when the database is the default (H2):
create sequence page_retrieval_seq
Unfortunately, this line is not actually in my 1.sql file, and I do not get this error when I run the system locally. I am running MySQL Ver 14.14 Distrib 5.6.12, for osx10.7 (x86_64).
I recognize that for production use, it is not advisable to enable automatic evolutions, but that is not the problem I want to solve here. My goal is for the CloudBees application to provide a snapshot of the latest working version of the code, and for evolutions to work on CloudBees MySQL just like they work for my local MySQL installation.
I have tried the steps outlined in this answer but it does not work on CloudBees, and anyway my current code already works correctly on a local installation of MySQL.
Why does my simple Play application not deploy correctly on CloudBees, and how can I fix it?
There appears to be a problem with play running evolutions incorrectly when ebean involved when running play in "production mode"
https://github.com/playframework/playframework/issues/1410
I have tested evolutions and they work even in production mode as long as ebean isn't used.
In any case, running evolutions in a production app is less than advisable, which is probably why this bug hasn't been picked up until now.
I updated the docs: https://developer.cloudbees.com/bin/view/RUN/Playframework with info on connecting to the database from anywhere, so you can run evolutions from the desktop or from Jenkins etc.
So run in something closer to play framework prod mode run "play start" to see this behavior for yourself.
Also, it appears JPA has wider use for ORM: https://github.com/typesafehub/play-spring-data-jpa
EDIT: Yeah im wrong, mis-read!
====================
As far as I know MySQL does not support sequences.
http://dev.mysql.com/doc/refman/5.6/en/faqs-general.html#qandaitem-B-1-1-6
mysql> create sequence test;
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 'sequence blag' at line 1