Problem with mysql

Problem with mysql

am 10.01.2010 10:50:51 von sql06

Hello

I have installed mysql, apache and phpmyadmin on a new server running Fedor=
a=20
Core 12.

=46or some unknown reason I cannot connect to the local host using a full
hostname.

This is what I have done:

r2-d2# mysql -u root -p
grant all on . to 'root'@'r2-d2' idenfified by 'secret-password';
grant all on . to 'root'@'r2-d2.dahl-stamnes.net' idenfified by
'secret-password';

flush privileges;
quit

r2-d2# mysql -h r2-d2 -u root -p
(works)

r2-d2# mysql -h r2-d2.dahl-stamnes.net -u root -p
ERROR 1130 (HY000): Host 'r2-d2.dahl-stamnes.net.' is not allowed to
connect to this MySQL server


Then I did:

r2-d2# mysql -u root -p
grant all on . to 'root'@'jedi.dahl-stamnes.net' idenfified by
'secret-password';

jedi# mysql -h r2-d2.dahl-stamnes.net -u root -p
(works)

I have checked the local DNS and 'r2-d2' and 'r2-d2.dahl-stamnes.net' resovl
to the same IP-addresse.

What's wrong?
=2D-=20
J=F8rn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Problem with mysql

am 10.01.2010 12:34:50 von sureshkumarilu

SGksDQpUaGUgZ3JhbnQgc3RtdCBoYXMgdG8gYmUgYXMgYmVsb3cuIA0KR3Jh bnQgYWxsIG9uIGRh
dGFiYXNlbmFtZS50YWJsZW5hbWUgdG8gdXNlcm5hbWVASVBvckhvc3RuYW1l ICBpZGVudGlmaWVk
IGJ5ICdwYXNzd29yZCc7DQoNClVzZSBhcyBhYm92ZQ0KR3JhbnQgc3RtdCBk b2Vzbid0IHJlcXVp
cmUgYSBmbHVzaCBzdG10Lg0KDQpTdXJlc2ggS3VuYQ0KTXlTUUwgREJBDQoN Ci0tLS0tLU9yaWdp
bmFsIE1lc3NhZ2UtLS0tLS0NCkZyb206IEr4cm4gRGFobC1TdGFtbmVzDQpU bzogbXlzcWx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byAn cm9vdCdAJ2plZGku
ZGFobC1zdGFtbmVzLm5ldCcgaWRlbmZpZmllZCBieQ0KJ3NlY3JldC1wYXNz d29yZCc7DQoNCmpl
ZGkjIG15c3FsIC1oIHIyLWQyLmRhaGwtc3RhbW5lcy5uZXQgLXUgcm9vdCAt cA0KKHdvcmtzKQ0K
DQpJIGhhdmUgY2hlY2tlZCB0aGUgbG9jYWwgRE5TIGFuZCAncjItZDInIGFu ZCAncjItZDIuZGFo
bC1zdGFtbmVzLm5ldCcgcmVzb3ZsDQp0byB0aGUgc2FtZSBJUC1hZGRyZXNz ZS4NCg0KV2hhdCdz
IHdyb25nPw0KLS0gDQpK+HJuIERhaGwtU3RhbW5lcw0KaG9tZXBhZ2U6IGh0 dHA6Ly93d3cuZGFo
bC1zdGFtbmVzLm5ldC9kYWhscy8NCg0KLS0NCk15U1FMIEdlbmVyYWwgTWFp bGluZyBMaXN0DQpG
b3IgbGlzdCBhcmNoaXZlczogaHR0cDovL2xpc3RzLm15c3FsLmNvbS9teXNx bA0KVG8gdW5zdWJz
Y3JpYmU6ICAgIGh0dHA6Ly9saXN0cy5teXNxbC5jb20vbXlzcWw/dW5zdWI9 c3VyZXNoa3VtYXJp
bHVAZ21haWwuY29tDQoNCg0KDQpTZW50IGZyb20gQmxhY2tCZXJyea4gb24g QWlydGVs

Re: Problem with mysql

am 10.01.2010 14:17:23 von sql06

On Sunday 10 January 2010 12:34, sureshkumarilu@gmail.com wrote:
> Hi,
> The grant stmt has to be as below.
> Grant all on databasename.tablename to username@IPorHostname identified =
by
> 'password';
>
> Use as above
> Grant stmt doesn't require a flush stmt.

Woops... Seems like the * in my first mail has dissapeared. The correct gra=
nt=20
statment I used was:

r2-d2# mysql -u root -p
grant all on *.* to 'root'@'r2-d2' idenfified by 'secret-password';
grant all on *.* to 'root'@'r2-d2.dahl-stamnes.net' idenfified by=20
'secret-password';
grant all on *.* to 'root'@'jedi.dahl-stamnes.net' idenfified by=20
'secret-password';

> ------Original Message------
> From: J=F8rn Dahl-Stamnes
> To: mysql@lists.mysql.com
> ReplyTo: sql06@dahl-stamnes.net
> Subject: Problem with mysql
> Sent: Jan 10, 2010 3:20 PM
>
> Hello
>
> I have installed mysql, apache and phpmyadmin on a new server running
> Fedora Core 12.
>
> For some unknown reason I cannot connect to the local host using a full
> hostname.
>
> This is what I have done:
>
> r2-d2# mysql -u root -p
> grant all on . to 'root'@'r2-d2' idenfified by 'secret-password';
> grant all on . to 'root'@'r2-d2.dahl-stamnes.net' idenfified by
> 'secret-password';
>
> flush privileges;
> quit
>
> r2-d2# mysql -h r2-d2 -u root -p
> (works)
>
> r2-d2# mysql -h r2-d2.dahl-stamnes.net -u root -p
> ERROR 1130 (HY000): Host 'r2-d2.dahl-stamnes.net.' is not allowed to
> connect to this MySQL server
>
>
> Then I did:
>
> r2-d2# mysql -u root -p
> grant all on . to 'root'@'jedi.dahl-stamnes.net' idenfified by
> 'secret-password';
>
> jedi# mysql -h r2-d2.dahl-stamnes.net -u root -p
> (works)
>
> I have checked the local DNS and 'r2-d2' and 'r2-d2.dahl-stamnes.net'
> resovl to the same IP-addresse.
>
> What's wrong?

=2D-=20
J=F8rn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Problem with mysql

am 11.01.2010 08:53:27 von Rakotomandimby Mihamina

> Jørn Dahl-Stamnes :
> I have checked the local DNS and 'r2-d2' and 'r2-d2.dahl-stamnes.net'
> resovl to the same IP-addresse.=20
> What's wrong?

Reverse resolution?

--=20
Architecte Informatique chez Blueline/Gulfsat:
Administration Systeme, Recherche & Developpement
+261 34 29 155 34 / +261 33 11 207 36

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Problem with mysql

am 11.01.2010 09:10:21 von sql06

On Monday 11 January 2010 08:53, Mihamina Rakotomandimby wrote:
> > Jørn Dahl-Stamnes :
> > I have checked the local DNS and 'r2-d2' and 'r2-d2.dahl-stamnes.net'
> > resovl to the same IP-addresse.
> > What's wrong?
>
> Reverse resolution?

I have checked that, and reverse DNS is OK - both resolve to 192.18.2.22

=2D-=20
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Problem with mysql

am 11.01.2010 09:55:54 von Ananda Kumar

--00504502acad80bc9f047cdfb446
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

use mysql;
select * from user;

see if you able to see 'r2-d2' entry in this table.

also you can try this

grant all on . to 'root'@'%' idenfified by
'secret-password';

regards
anandkl
On Mon, Jan 11, 2010 at 1:40 PM, J=F8rn Dahl-Stamnes
wrote:

> On Monday 11 January 2010 08:53, Mihamina Rakotomandimby wrote:
> > > J=F8rn Dahl-Stamnes :
> > > I have checked the local DNS and 'r2-d2' and 'r2-d2.dahl-stamnes.net'
> > > resovl to the same IP-addresse.
> > > What's wrong?
> >
> > Reverse resolution?
>
> I have checked that, and reverse DNS is OK - both resolve to 192.18.2.22
>
> --
> J=F8rn Dahl-Stamnes
> homepage: http://www.dahl-stamnes.net/dahls/
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Danandkl@gmail.com
>
>

--00504502acad80bc9f047cdfb446--

Re: Problem with mysql

am 11.01.2010 10:08:29 von sql06

On Monday 11 January 2010 09:55, Ananda Kumar wrote:
> use mysql;
> select * from user;
>
> see if you able to see 'r2-d2' entry in this table.
>
> also you can try this
>
> grant all on . to 'root'@'%' idenfified by
> 'secret-password';

I just found the cause of the problem... /etc/nsswitch.conf.

It said that files should be used before dns. After I changed the order, it=
=20
worked (so did the strange sendmail problem I had).

But still I wonder why it worked on the other host, since it also had the=20
order "files dns" in it's nsswitch.conf file...

Thanks for your support.

=2D-=20
J=F8rn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Problem with mysql

am 11.01.2010 12:32:28 von Rakotomandimby Mihamina

> Jørn Dahl-Stamnes :
> > > I have checked the local DNS and 'r2-d2' and
> > > 'r2-d2.dahl-stamnes.net' resovl to the same IP-addresse.
> > > What's wrong?
> > Reverse resolution?
> I have checked that, and reverse DNS is OK - both resolve to
> 192.18.2.22

I read you solved your problem, but by "reverse" I meant what
"r2-d2.dahl-stamnes.net" resolves to.

--=20
Architecte Informatique chez Blueline/Gulfsat:
Administration Systeme, Recherche & Developpement
+261 34 29 155 34 / +261 33 11 207 36

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Problem with mysql

am 11.01.2010 12:33:58 von Rakotomandimby Mihamina

(Correction, seel below)

> Jørn Dahl-Stamnes :
> > > I have checked the local DNS and 'r2-d2' and
> > > 'r2-d2.dahl-stamnes.net' resovl to the same IP-addresse.
> > > What's wrong?
> > Reverse resolution?
> I have checked that, and reverse DNS is OK - both resolve to
> 192.18.2.22

I read you solved your problem, but by "reverse" I meant what
"r2-d2.dahl-stamnes.net" resolves to.

Sorry (...) what "192.18.2.22" resolves to.

--=20
Architecte Informatique chez Blueline/Gulfsat:
Administration Systeme, Recherche & Developpement
+261 34 29 155 34 / +261 33 11 207 36

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Problem with mysql

am 11.01.2010 14:08:52 von sql06

On Monday 11 January 2010 12:33, Mihamina Rakotomandimby wrote:
> (Correction, seel below)
>
> > Jørn Dahl-Stamnes :
> > > > I have checked the local DNS and 'r2-d2' and
> > > > 'r2-d2.dahl-stamnes.net' resovl to the same IP-addresse.
> > > > What's wrong?
> > >
> > > Reverse resolution?
> >
> > I have checked that, and reverse DNS is OK - both resolve to
> > 192.18.2.22
>
> I read you solved your problem, but by "reverse" I meant what
> "r2-d2.dahl-stamnes.net" resolves to.
>
> Sorry (...) what "192.18.2.22" resolves to.

it resolv to r2-d2.dahl-stamnes.net

=2D-=20
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg