Warning: mysql_connect(): No such file or directory

On January 27, 2015, in PHP, by Anuj Gakhar

I’ve been trying to setup a local PHP/Mysql app today and came across this issue with the database connection. Warning: mysql_connect(): No such file or directory The connection parameters I’ve been using were as follows :- [php]define("DB_HOST", "localhost"); define("DB_USER", "root"); define("DB_PASS", ""); define("DB_NAME", "my_db");[/php] Turns out, the fix was quite simple. Change the above code […]

 
© 2011 Anuj Gakhar