[PLUG] Cannot access MySQL with hostname but can with localhost

drew wymore drew.wymore at gmail.com
Sat Jun 16 07:33:24 UTC 2007


On 6/16/07, tkubaska at charter.net <tkubaska at charter.net> wrote:
>
> Here's something interesting ... I tried --bind-address=127.0.0.11 on my
> mysql invocation because my /etc/hosts has
> 127.0.0.1       localhost
> 127.0.1.1       halibut
>
> Now is this the right thing to do? Should I be editing the bind-address in
> my.cnf instead? Using the inet addr that comes from ifconfig did not work.
> This is a LAN and that inet addr is is the 192.168..... one.
>
> I feel I'm hacking without knowledge here, so advice is appreciated.
> Thanks.
> -ted
> ____________________


I may have missed this in what you wrote above. Do you have
$user@'$theboxyourconnectingfrom' on the database server?

You would either need to grant a wildcard user or otherwise you have to add
a user for each hostname you would be connecting from.

Just re-read your above post. For the localhost issue you need to add a user
for $user at localhost instead of $user at 127.0.0.1

Let me know if that makes sense.



More information about the PLUG mailing list