开发者

Error connecting to database in Aptana studio 2 with php

When I try to connect to the database with the php command:mysqli_connect("localhost","us开发者_开发百科ername","password") I take the message below:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/pinkonomy/Aptana Studio Workspace/sokratakos/scot.php on line 2

How to solve this?What is the problem with this?

Thanks in advance


I has a similar problem and changed localhost to localhost.localdomain as it is in my hosts file and that also fixed the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜