Community

Setting up Drupal 7 on a MacBook database fails to connect

Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in DatabaseConnection->__construct() (line 304 of /Users/nino/Sites/drupal-7.19/includes/database/database.inc).
Warning: PDO::__construct(): [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servn (trying to connect via tcp://Localhost.:3306) in DatabaseConnection->__construct() (line 304 of /Users/nino/Sites/drupal-7.19/includes/database/database.inc).

I'm running PHP 5.3.3 MySQL 5.0.7

I'm connecting to MySQL in the php.ini -> mysql.default_socket = /tmp/mysql.sock

This set up has worked for years on all the custom coding projects I've done as well as a fresh install of Wordpress last month.

I use Navicat and have set up the "Drupal" database, the user and the user permissions twice.

Any ideas?