OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Database connection error on install

This topic contains 5 replies, has 2 voices, and was last updated by  Mark Brinton 8 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #31001

    Mark Brinton
    Participant

    Hello,
    I am getting the following error on install (either 2nd screen of GUI or CLI). Any suggestions? The host, username, and password (simple password for a local machine only) are correct.

    Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Connection refused' in /opt/local/apache2/vhosts/orocommerce-application/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace: #0 /opt/local/apache2/vhosts/orocommerce-application/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:host=127....', 'root', 'mysqlroot', Array) #1 /opt/local/apache2/vhosts/orocommerce-application/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(45): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=127....', 'root', 'mysqlroot', Array) #2 /opt/local/apache2/vhosts/orocommerce-application/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, 'root', 'mysqlroot', Array) #3 /opt/local/apache2/vhosts/orocommerce-application/src/Oro/src/Oro/Bundle/EntityConfigBundle/Config/ConfigModelManager.php(86): Doctrine\DBAL\Connection->connect() #4 /opt/local/apache2/vhosts/ in /opt/local/apache2/vhosts/orocommerce-application/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 103

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #31002

    Michael
    Keymaster

    Hi Mark,

    Please check whether your MySQL server is accepting connections via a Unix socket, or on a TCP port 3306. If the latter – you have to specify the 3306 port number during installation.

    On a Linux machine you can check connectivity with the netstat util like this:


    netstat -ln | grep -E '(mysql|3306)'

    #31003

    Mark Brinton
    Participant

    It is using a socket (/opt/local/var/run/mysql56/mysqld.sock) – it is a default Macports install. I can connect to the database without issue using command line or MySQL. Do you have any other suggestions?

    #31004

    Michael
    Keymaster

    You can enter the socket path (/opt/local/var/run/mysql56/mysqld.sock) when asked by composer for database_port.

    If you are already past the composer install step – you can edit app/config/parameters.yml, replace

    with

    and clear the cache

    #31005

    Mark Brinton
    Participant

    Thank you, I tried your suggestion (edit and clear cache) but no change in the outcome. Also tried changing the database_host to localhost, but that gives a different error:

    An Exception was thrown while handling: Internal Server Error

    I will try a reinstall which I don’t think will cause a different outcome, but will give it a try.

    #31006

    Mark Brinton
    Participant

    Reinstalled from GitHub using the socket as port during composer install, but still get the same error.

Viewing 5 replies - 1 through 5 (of 5 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top