Jump to content

Create database tables - An error occurred during installation


Recommended Posts

  • 3 weeks later...

Hi,

 

Is anyone else having trouble getting past Create database tables when installing 1.5.6.1?

 

It hangs everytime on this step at 12% installation with the following message:

 

An error occurred during installation...

 

Thanks in advance.

Richard

 

Check that you have a PHP.ini file in your root folder on your server and make sure you increase the  the timeout values so it doesn't timeout while updating the database. This will save you lots of Googling.

I changed the following to 4 min 60 x 4 = 240 in my php.ini file

 

default_socket_timeout = 240
mysql.connect_timeout = 240
  • Like 1
Link to comment
Share on other sites

I have had the same problem - Prestashop installation frozen at 12 per cent.

 

I suspect that the problem (including the timeout while updating the database) is caused by the sample data which is uploading for a long time. Sadly, in the latest versions of Prestashop, option not to include sample data or to choose MySQL type during installation is missing.

 

I have solved the installation problem by installing the shop on localhost, dividing the database into six or seven smaller parts (as your hosting server allows), and uploading it, thus evading the timeout. I also cleaned up the sample data and optimized the tables before uploading, which resulted in 30 percent smaller database :).

 

Hope that this will help somebody stuck with the same installation bug.

Edited by feelgood (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Hi all,

I'm having the some problem.

I changed also the .php as some of you report and I'm not able to complete the installation that stops at 12%

The crazy thing is that I had installed presta on the some provider (dreamhost) but for some problems I had today I decided to make a fresh installation of presta 1.6 and.... now I have the problem.

Any other work around?

Thank you in advance

Boris

Edited by borisdifiore (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hi everyone,

 

i am new in the forum and have the same problem that the installation stops at 12%, while the database is created.

I use the 1.6.0.7 Version and the Provider can't change the max_execution_time that is set to a value of 60 seconds.

How can i divide the database in parts or is there a way to install prestashop without the wizard ?

Link to comment
Share on other sites

  • 6 months later...

Hi all,

I'm having the some problem.

I changed also the .php as some of you report and I'm not able to complete the installation that stops at 12%

The crazy thing is that I had installed presta on the some provider (dreamhost) but for some problems I had today I decided to make a fresh installation of presta 1.6 and.... now I have the problem.

Any other work around?

Thank you in advance

Boris

Install Prestashop in Internet Explorer 8.

All good install - ok 100%

greats!

Link to comment
Share on other sites

  • 4 months later...
  • 3 weeks later...
  • 6 months later...

OS: El Capitan

Apache

MySQL

 

I was drawn to the nature of the error in my case.  All pointed to SQL restrictions. Primary Key not being able to have a NULL value and incorrect date format.  I made changes to the SQL file:

 

file is: ~/install/data/db_structure.sql
 
The number is the line number in the file.  The first line is the original text, followed by a separator and the next line is the new text.  This got me past the database issues.  
 
314c314
<   `id_product_attribute` int(10) unsigned DEFAULT NULL,
---
>   `id_product_attribute` int(10) unsigned NOT NULL,
762c762
<   `last_connection_date` date DEFAULT '0000-00-00',
---
>   `last_connection_date` date DEFAULT NULL,
1470c1470
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
1512c1512
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
1544c1544
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
1564c1564
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
2628c2628
<   `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
---
>   `last_update` datetime NOT NULL,
2634c2634
<   `last_flush` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
---
>   `last_flush` datetime NOT NULL,
Link to comment
Share on other sites

Hi, i have the same error during installing prestashop 1.6.1.3 on xampp and windows10.

 

This is the error that shows me (ps_mod_dev= true) : 

PrestaShopDatabaseException]

Table 'prestashop.ps_shop_url' doesn't exist
 

SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
                    FROM ps_shop_url su
                    LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop)
                    WHERE (su.domain = '127.0.0.1' OR su.domain_ssl = '127.0.0.1')
                        AND s.active = 1
                        AND s.deleted = 0
                    ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC

 

t line 791 in file classes/db/Db.php

 

786. if ($webservice_call && $errno) {
787. $dbg = debug_backtrace();
788. WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
790. if ($sql) {
791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
792. }
793.
794. throw new PrestaShopDatabaseException($this->getMsgError());
795. }
796. }
 
 
Edited by giovanniciquera (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

I have the same problem, prestashop installation process stops at 12% : 

  1. Create database tables
An error occurred during installation...

I have tried many online solutions including the changes I made to php.ini.

 

but still I got the same problem with Nginx as my Webserver.

Although I could install prestashop with apache2 as my Webserver.

 

I have read many guides and instructions on prestashop installation with Nginx, none of them solved my problem.
Would you please help me with this issue?

Link to comment
Share on other sites

I am still working on this problem,

Even with HHVM and Nginx I could not solve the problem,

I used solutions on this page and a dozen of other pages,

 

I can install Wordpress or other CMS with my server configuration, 

with Nginx+HHVM or Nginx+fpm, or Apache2+normal PHP

but prestashop default db_structure.sql is not compatible with

mysql 5.6 + Nginx + HHVM or fpm !!!

 

 

when I wrote: sudo mysql_install_db

I had this error and warning:

 

Installing MySQL system tables...2016-04-09 14:17:53 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-09 14:17:53 0 [Note] /usr/sbin/mysqld (mysqld 5.6.28-0ubuntu0.15.10.1) starting as process 24725 ...
 
//--------------------------------------------------------------------
Finally I found the origin of the problem on this page:

http://dev.mysql.com/doc/refman/5.6/en/upgrading-from-previous-series.html

 

by setting 

explicit_defaults_for_timestamp = 1 in your my.cnf [mysqld] section I could get rid of the error and after restarting mysql (sudo service mysql restart)

I could get this:

Installing MySQL system tables...2016-04-09 14:32:10 0 [Note] /usr/sbin/mysqld (mysqld 5.6.28-0ubuntu0.15.10.1) starting as process 25189 ...

 

But still working on the problem, and I will let you know if I solve it

At least I know what causes the problem !

 

SOLVED + BUG REPORT!!!
 
I finally managed to solve the problem with reinstalling a new ubuntu 14.01 LTS on the server,
and MYSQL 5.5, and the rest is almost like this site:
 
I can install it with HHVM too, the problem was with mysql5.6 and its new configuration as described on their page:
Finally I found the origin of the problem on this page:
************* so there are conflict on mysql5.6 + *********** new release of Prestashop 1.64
on Nginx as the web server! I have checked it works fine with apache2 but not Nginx with
Neither HVVM nor FPM :)
Edited by zamannejad (see edit history)
Link to comment
Share on other sites

  • 10 months later...

I have just now got this problem, the funny thing is, when I set it up, went like clock work, not a hiccup, not a problem.  Site has been running for 3 weeks then this issue. I have spent 22 hours trying everyones recommendations and still no resolution.

 

Maybe PrestaShop just isn't cut out for the tasks?

Apparently the admins and creators don't care since the issue seems to be a major issue that has gone on unresolved.

 

Will try for another 24 hours, after that...

Link to comment
Share on other sites

 

OS: El Capitan

Apache

MySQL

 

I was drawn to the nature of the error in my case.  All pointed to SQL restrictions. Primary Key not being able to have a NULL value and incorrect date format.  I made changes to the SQL file:

 

file is: ~/install/data/db_structure.sql
 
The number is the line number in the file.  The first line is the original text, followed by a separator and the next line is the new text.  This got me past the database issues.  
 
314c314
<   `id_product_attribute` int(10) unsigned DEFAULT NULL,
---
>   `id_product_attribute` int(10) unsigned NOT NULL,
762c762
<   `last_connection_date` date DEFAULT '0000-00-00',
---
>   `last_connection_date` date DEFAULT NULL,
1470c1470
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
1512c1512
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
1544c1544
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
1564c1564
<   `available_date` date NOT NULL DEFAULT '0000-00-00',
---
>   `available_date` date NOT NULL,
2628c2628
<   `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
---
>   `last_update` datetime NOT NULL,
2634c2634
<   `last_flush` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
---
>   `last_flush` datetime NOT NULL,

 

Yeah.... Nope method has failed!

Link to comment
Share on other sites

PROBLEM SOLVED!

 

While I was trying over and over to install Prestashop, I noticed in the corner of my eye that my girlfriends stupid cat was playing with the wires to the network.

After investigating, I found that one of the cat 5 cable ends clip was broke off and the stupid cat (I dislike cats by the way) was making the cable connect, disconnect or something.  Once I replaced the entire cable, Presto! Prestashop installed without a glitch!

 

Results:

Cat got thrown out of house, with me there shortly after.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

***** SOLVED TO ME *******

I change PHP-FPM TIMEOUT as suggested by reflectiveoffice without success.
After that I change NGINX php-fpm timeout.

SUCESS!!!!!!

I'm testing on an unsual enviroment.
RASPBERRY PI 2, Ubuntu server (minimal installation) + NGINX + PHP 7 + MYSQL
 

location ~ \.php$ {
	include /etc/nginx/fastcgi_params;
        fastcgi_pass  unix:/var/run/php5-fpm.sock;
	fastcgi_read_timeout 300; 
}
Link to comment
Share on other sites

  • 2 years later...

I am still getting this error in version 1.7. 

i have tried increasing the timeout values suggested and still getting stuck on 12%. I tried turning on prestashop dev mode to see the exact error message and another error popped up on the stage before "Create database tables" so i could not view it. 

Link to comment
Share on other sites

On 7/26/2021 at 7:06 PM, onuzman said:

I am still getting this error in version 1.7. 

i have tried increasing the timeout values suggested and still getting stuck on 12%. I tried turning on prestashop dev mode to see the exact error message and another error popped up on the stage before "Create database tables" so i could not view it. 

PROBLEM SOLVED

The issue was with the default SQL user that could access the database. I just created a new user with no restrictions

Link to comment
Share on other sites

  • 1 year later...

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...