Welcome Guest, Not a member yet? Register   Sign In
Unable to connect to the DB - CI 2
#21

[eluser]johnpeace[/eluser]
Same problem here running a fresh install of MySQL 5.5.8 with PHP 5.3.5 compiled with mysqlnd drivers.

Same CI application runs on my iMac with MySQL 5.1.x and PHP 5.2.9....not on the new MacBook Pro though...

Edit:
I figured it out...

MySQL, when it starts, puts it's mysql.sock file in /tmp. The MySQL extension in php was looking for it in /var/mysql

So, I just changed the php.ini file to look for mysql.sock in /tmp and I'm good to go.
#22

[eluser]gregormck[/eluser]
Same issues. Really good post here about on SE.

Basically I set this and it worked:

$db['default']['hostname'] = ':/Applications/MAMP/tmp/mysql/mysql.sock';

http://stackoverflow.com/questions/42199...connect-vi




Theme © iAndrew 2016 - Forum software by © MyBB