I am getting the following error

SQLSTATE[HY000] [2003] Can't connect to MySQL server on '' (13)

#0 html/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()......

I have confirmed the PDO is installed.

I can connect via the CLI

[magento@web2 etc]# mysql -uuser -p'MyBigPassword' -h10.0.1.24 magento_prod
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 27
Server version: 5.5.44-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [magento_prod]> 

This was the hosting company having seLinux enabled and Apache could not read parts of the application. I disabled it and it works now

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.