* [gentoo-user] mysql, bind and dns hostnames
@ 2006-07-26 12:31 sguglia
2006-07-26 13:20 ` Alexander Kirillov
0 siblings, 1 reply; 5+ messages in thread
From: sguglia @ 2006-07-26 12:31 UTC (permalink / raw
To: gentoo-user
hello everybody..
I just installed on PC1 (pc-0001.localarea) mysql and bind. locally all OK.
when I try to connect via phpmyadmin from PC2 (pc-0002.localarea), the
following error prompts:
Host '192.168.0.2' is not allowed to connect to this MySQL server
- on my server, I inserted a new record for host=pc-0002.localarea in
mysql.user table with the correct user&password, but it seems that somewhere
mysql can not to resolve client's IP. Of course, if I insert a new
host=192.168.0.2 record, it works fine, but I prefere to use hostnames.
I tried to look into my.cnf, but commenting bind-address did not change
anything.
some advice?
Thanks, stefano.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] mysql, bind and dns hostnames
2006-07-26 12:31 [gentoo-user] mysql, bind and dns hostnames sguglia
@ 2006-07-26 13:20 ` Alexander Kirillov
2006-07-26 14:46 ` sguglia
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kirillov @ 2006-07-26 13:20 UTC (permalink / raw
To: gentoo-user
> I just installed on PC1 (pc-0001.localarea) mysql and bind. locally all OK.
> when I try to connect via phpmyadmin from PC2 (pc-0002.localarea), the
> following error prompts:
>
> Host '192.168.0.2' is not allowed to connect to this MySQL server
>
> - on my server, I inserted a new record for host=pc-0002.localarea in
> mysql.user table with the correct user&password, but it seems that somewhere
> mysql can not to resolve client's IP. Of course, if I insert a new
> host=192.168.0.2 record, it works fine, but I prefere to use hostnames.
If you have net-dns/bind-tools installed
what's the output of dig -x 192.168.0.2 ?
Are you using FQDN in mysql tables?
You should use GRANT statements instead of hacking
mysql tables directly and FLUSH PRIVILEGES afterwards.
HTH,
Sasha
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] mysql, bind and dns hostnames
2006-07-26 13:20 ` Alexander Kirillov
@ 2006-07-26 14:46 ` sguglia
2006-07-26 15:17 ` Alexander Kirillov
0 siblings, 1 reply; 5+ messages in thread
From: sguglia @ 2006-07-26 14:46 UTC (permalink / raw
To: gentoo-user
Alle 15:20, mercoledì 26 luglio 2006, Alexander Kirillov ha scritto:
> If you have net-dns/bind-tools installed
> what's the output of dig -x 192.168.0.2 ?
>
> Are you using FQDN in mysql tables?
>
> You should use GRANT statements instead of hacking
> mysql tables directly and FLUSH PRIVILEGES afterwards.
>
> HTH,
> Sasha
hi Sasha,
# dig -x 192.168.0.2
; <<>> DiG 9.3.2 <<>> -x 192.168.0.2
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 914
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;2.0.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
2.0.168.192.in-addr.arpa. 172800 IN PTR
pc-0002.0.168.192.in-addr.arpa.
;; AUTHORITY SECTION:
0.168.192.in-addr.arpa. 172800 IN NS
pc-0002.0.168.192.in-addr.arpa.
;; Query time: 5 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Wed Jul 26 17:04:14 2006
;; MSG SIZE rcvd: 78
- yes, I use FQDNs
- I hacked tables directly and flush privileges + hosts afterwards..
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] mysql, bind and dns hostnames
2006-07-26 14:46 ` sguglia
@ 2006-07-26 15:17 ` Alexander Kirillov
2006-07-26 16:06 ` sguglia
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kirillov @ 2006-07-26 15:17 UTC (permalink / raw
To: gentoo-user
>> If you have net-dns/bind-tools installed
>> what's the output of dig -x 192.168.0.2 ?
>
> # dig -x 192.168.0.2
>
> ; <<>> DiG 9.3.2 <<>> -x 192.168.0.2
> ;; global options: printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 914
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;2.0.168.192.in-addr.arpa. IN PTR
>
> ;; ANSWER SECTION:
> 2.0.168.192.in-addr.arpa. 172800 IN PTR
> pc-0002.0.168.192.in-addr.arpa.
>
> ;; AUTHORITY SECTION:
> 0.168.192.in-addr.arpa. 172800 IN NS
> pc-0002.0.168.192.in-addr.arpa.
Hi Stefano,
Check your reverse zone.
dig -x 192.168.0.2 on mysql box should give you something like:
;; ANSWER SECTION:
2.0.168.192.in-addr.arpa. 172800 IN PTR pc-0002.localarea.
Same goes for AUTHORITY SECTION
try dig pc-0002.localarea as well.
You may also install and run net-dns/dnswalk
which is a DNS database debugger.
HTH,
Sasha
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] mysql, bind and dns hostnames
2006-07-26 15:17 ` Alexander Kirillov
@ 2006-07-26 16:06 ` sguglia
0 siblings, 0 replies; 5+ messages in thread
From: sguglia @ 2006-07-26 16:06 UTC (permalink / raw
To: gentoo-user
Alle 17:17, mercoledì 26 luglio 2006, Alexander Kirillov ha scritto:
> Hi Stefano,
>
> Check your reverse zone.
> dig -x 192.168.0.2 on mysql box should give you something like:
>
> ;; ANSWER SECTION:
> 2.0.168.192.in-addr.arpa. 172800 IN PTR pc-0002.localarea.
>
> Same goes for AUTHORITY SECTION
>
> try dig pc-0002.localarea as well.
> You may also install and run net-dns/dnswalk
> which is a DNS database debugger.
>
> HTH,
> Sasha
the right way, finally. Thank you! I recheck my 192.168.0 reverse zone and the
mistake was (apparently) this:
not-working:
$ORIGIN 0.168.192.IN-ADDR.ARPA.
$TTL 2d
@ IN SOA pc-0001 root.pc-0001 (2005071200 3h 1h 1w 1d)
@ IN NS pc-0001
1 IN PTR pc-0001
2 IN PTR pc-0002
working:
$ORIGIN 0.168.192.IN-ADDR.ARPA.
$TTL 2d
@ IN SOA pc-0001 root.pc-0001 (2005071200 3h 1h 1w 1d)
@ IN NS pc-0001.localarea.
1 IN PTR pc-0001.localarea.
2 IN PTR pc-0002.localarea.
anyway, now it works!!
Thank you Sasha, bye.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-07-26 16:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-26 12:31 [gentoo-user] mysql, bind and dns hostnames sguglia
2006-07-26 13:20 ` Alexander Kirillov
2006-07-26 14:46 ` sguglia
2006-07-26 15:17 ` Alexander Kirillov
2006-07-26 16:06 ` sguglia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox