开发者

Databse Connection error By Giving Specific IP address-Drupal

I have created database and user and give all the privilege to the user.When i give the IP as Database host.It will show the following errors.Giving hostname as localhost it will work fine.

I am using phpmyadmin 3.3.2...

The error 开发者_运维百科message is given below.

Failed to connect to your MySQL database server. MySQL reports the following message: Can't connect to MySQL server on '192.168.85.10' (111)


It seems that the IP address you use is your "external" IP and not the IP localhost would resolve to, which is most of the time your loopback: 127.0.0.1.

So if you are trying to connect from the same computer as the database is running you should use 127.0.0.1 as the IP address.

If you are trying to connect to your database from another computer on the network, you should enable MySQL remote access in your my.conf (MySQL config file). Because by default MySQL disables remote incoming connections. You do this by setting the "bind-address" line to your real (external) server IP as such:

bind-address = 192.168.xx.xx (assuming its on your local network)

Or put the bind-address in comment.

Also make sure that the skip-networking option is commented as such:

#skip-networking

And then restart your MySQL server.

Now also make sure that your MySQL users are also allowed to connect from locations other then "@localhost".

I hope this helps!

Cheers, Timusan

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜