I am trying to establish a very simple connection to mysql db and i keep getting this error:Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) ... However, mysqladmin does manage to connect to the db, and also I am using Java EE with entities which I also managed to connect to mysql. My code is this : $DBhost = "localhost"; $DBuser = "root"; $DBpass = my_password; $link_id = mysql_connect($DBhost,$DBuser,$DBpass); What should I do ? Thanks, Tomer.