Jump to content

Failed Install - You have an error in your SQL syntax


Guest

Recommended Posts

Hi guys,

 

Ive installed/reinstalled prestashop about 10 times now and getting all sorts of errors. Not once has it installed properly. :(

 

I'm currently getting the following error at 12% installation. 

 

  1. Create settings.inc file
  2. Create database tables
    1. SQL error on query 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 'COLLATION' at line 9

 

Before hand i was getting a language error at 23% that has either resolved or will come back once the error above has been corrected.

 

Can someone please help?

 

Oooh and before anyone asks. Ive read around the forums about this "ini.php" file. I questioned one.com (hosting provider) about this file and they said i cant change anything on it. boo.

 

Link to comment
Share on other sites

This basically says that mariadb doesn't understand the way prestashop is setting up tables (e.g. running SQL queries to create the different tables). My guess is that php.ini won't help you here either. 

 

Does one.com have a script-installer section on your hosting control panel with support for PrestaShop? That would most probably set it up for you properly, although not sure whether one.com has that.

Link to comment
Share on other sites

Although this _is_ strange. I mean, you describe that it fails at different points of the install (also after having ran different queries).

 

MariaDB is supposed to be a drop-in replacement for MySQL (no looking back), I'm using it myself and have no issues. 

 

Could you post some more errors that you receive? It's always at a different percentage?

Link to comment
Share on other sites

  • 2 years later...

Hello everyone,

same problem here with installing PrestaShop 1.7.2.4, stopping at 13% of the installation process.

Does anyone know what to do with the error description attached?

Thankful for answers after having an endless list of PrestaShop installation problems that I already fixed myself. Cannot understand why there are always problems with PrestaShop.

Best

Victoria

 

Bei der Installation ist ein Fehler aufgetreten...

  1. 1: SQL-Fehler in der Abfrage 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 'IF NOT EXISTS `kh_gender` ( `id_gender` int(11) NOT NULL AUTO_INCREMENT, `ty' at line 1

Bildschirmfoto 2017-11-03 um 12.05.56.png

Link to comment
Share on other sites

First thing you should do using phpmyadmin is to see if the table named kh_gender exists in your prestashop database.  Based on the error you received, it should not exist since the install failed at this point.

Assuming it does not exist, then take the following statement, and again using phpmyadmin execute this statement to create the table. 

CREATE TABLE IF NOT EXISTS `kh_gender` (
  `id_gender` int(11) NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) NOT NULL,
  PRIMARY KEY (`id_gender`)
) DEFAULT CHARSET=utf8 COLLATION;

If the issue is with your database server, then it should fail again. 

If it does not fail, then the issue is somewhere else and that will be rather difficult to troubleshoot on the forum.

If that table already exists, then you'll need to think about why it would exist if creating the table during the upgrade failed.  Perhaps you have attempted to install PS more than once, and it failed previously?  If that is the case, you should really delete these tables first, and then re-try the install.

I'd also be curious to which version of PHP is being used

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...