开发者

Error connecting to database in Aptana studio 2 with php

开发者 https://www.devze.com 2023-02-20 18:58 出处:网络
When I try to connect to the database with the php command:mysqli_connect(\"localhost\",\"us开发者_开发百科ername\",\"password\") I take the message below:

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

精彩评论

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