magestead
magestead copied to clipboard
Can't connect to database
I can ssh into the database from Sequel pro but when Magento tries to connect I get
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
. I just have the default local.xml file which looks like this
<resources>
<db>
<table_prefix><![CDATA[]]></table_prefix>
</db>
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[magestead]]></username>
<password><![CDATA[vagrant]]></password>
<dbname><![CDATA[magestead]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
</default_setup>
</resources>
Anybody know why this would be?
What connection details are you using to connect with Sequel Pro? I just connect using SSH tunnel using vagrant default connections then connect to the DB using the setup credentials.