Jump to content

Database Error


Recommended Posts

Hi guys,

I was installing PrestaShop for the first time with Xamp and when i got to "Store installation" section and in "Create database tables" an error had came up, can u help me?

the following Error:

1: 23:47:30 ERROR [console] Error thrown while running command "prestashop:schema:update-without-foreign". Message: "An exception occured in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. " ["exception" => Doctrine\DBAL\Exception\ConnectionException { …},"command" => "prestashop:schema:update-without-foreign","message" => "An exception occured in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. "]

thank you

Issue.png

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

42 minutes ago, El Patron said:

this usually issue with upgrade not native first time install.

I recommend installing on remote host to see if solved issue.

You also did not mention which PS version you are trying to install, if latest then try previous version.

Hey, thanks for answering

I used the latest version, but i also tested the previous version and didnt work.

What can i do?

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

  • 4 years later...

 

the same error here with XAMPP running on Windows 10 Pro: 

Link to database cannot be established: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
at line 119 in file classes/db/DbPDO.php

I was working on store translations a few days ago until late at night. In the morning when I turned on the computer and started the XAMPP Control Pannel he didn't manage to connect to database, the MySQL module tries to start but stops automatically as soon as it starts. I have some backup files but there are a lot of work between them and the time the error occurred, and I don't want to loose those changes.

The MySQL 3306 PORT it looks like it hasn't changed, I attached some log informations from the MySQL XMPP logs folder, maybe they will help in some way to solve the problem.

PrestaShop 8.1.2, XAMPP Control Panel v3.3.0 (running on Windows 10 Pro), ApacheFriends XAMPP Version 8.1.25

+ Apache 2.4.58
  + MariaDB 10.4.32
  + PHP 8.1.25 (VS16 X86 64bit thread safe) + PEAR
  + phpMyAdmin 5.2.1
  + OpenSSL 1.1.1p
  + ADOdb 518a
  + Mercury Mail Transport System v4.63 (not included in the portable version)
  + FileZilla FTP Server 0.9.41 (not included in the portable version)
  + Webalizer 2.23-04 (not included in the portable version)
  + Strawberry Perl 5.32.1.1 Portable
  + Tomcat 8.5.96
  + XAMPP Control Panel Version 3.3.0.
  + XAMPP mailToDisk 1.0 (write emails via PHP on local disk in <xampp>\mailoutput. Activated in the php.ini as mail default.)

 

 

mysql-port.jpg

xampp-control-panel-error.jpg

my.ini-file.jpg

mysql_error.log.jpg

Link to comment
Share on other sites

  • 2 weeks later...
On 2/5/2024 at 6:08 PM, musicmaster said:

Your Mysql crashed.

See here or here.

Thank you very very much. My issue was solved according to your recommendation from the second link by copying and replacing these files (ibdata1, ib_logfile0 and ib_logfile1 + database content <databasename>/*.frm and <databasename>/*.ibd)  in a fresh instalation of XAMPP. God bless you friend!

  • Like 1
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...