Re: Case sensitivety behaviour [followup re: bugfix]

2002-09-25 Thread Paul DuBois

At 20:25 -0500 9/23/02, Paul DuBois wrote:
At 16:43 -0700 9/23/02, Jan Steinman wrote:
  From: Moestl, Wolfgang [EMAIL PROTECTED]

Is there a defined behaviour for handling the case-sensitivety for 
user- and hostnames?

According to the specification for the Domain Name System (DNS), 
Internet hostnames are always supposed to be case-insensitive.

Since other entities in MySQL are case-sensitive, this may seem 
inconsistent, but it is imposed by international standards. It is 
NOT under the control of MySQL.

To get it even more confusing, the values for user and host at the 
SHOW GRANTS FOR [user]@[host] are BOTH FULLY case-sensitive.

If verified, this is a bug. DNS-based hostnames should NEVER be 
case-sensitive.

MySQL behaves like this:

Usernames, passwords, and database and table names are case sensitive in
grant table entries.

Hostnames and column names are not.


The fact that you observed this using the magic hostname 
localhost may indicate that MySQL is cheating by doing its own 
management of this unique name. Any other fully qualified domain 
name should go through your operating system's address resolver, 
and had better be case-insensitive!

localhost is indeed interpreted specially in MySQL.  On UNIX, it means
connect using the UNIX domain socket rather than TCP/IP.  So in this
case, DNS is not involved.

In any case, I do not observe a difference between setting up
user accounts using host 'localhost' versus 'LOCALHOST'.

I *do* observe case sensitive hostname behavior for SHOW GRANTS.
This should not be.  I'll ask about it.

Okay, there was indeed a case comparison problem with SHOW GRANTS.
This has now been fixed for the upcoming 4.0.4 release.





On UNIX and clones: nslookup localhost nslookup Localhost and 
nslookup LoCaLhOsT all answer the same IP.

If case-insensitivity with localhost is important, you might just 
map some other name to your machine and use that instead. This is 
also a good policy in case you later want to move your database to 
its own machine. For example, I have data defined as a CNAME in 
DNS for the machine I'd normally refer to as localhost. It seems 
to work -- as it should -- if I call it data, Data, dATA, etc.

--
: Jan Steinman -- nature photography: http://www.Bytesmiths.com
: Bytesmiths -- artists' services: http://www.Bytesmiths.com/Services
: Join the forums at http://www.Bytesmiths.com/wiki


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: Case sensitivety behaviour

2002-09-23 Thread Victoria Reznichenko

Moestl,
Monday, September 23, 2002, 9:49:14 AM, you wrote:

MW Is there a defined behaviour for handling the case-sensitivety for user- and 
hostnames?
MW I did not find any information on this at the docs for the 4.0.3 MAX version which 
I'm using.


MW For example, the following database connections are valid:
MW root@localhost
MW Root@localhost

MW However, the following connection is resulting in an Connection failed: 1045 - 
Accss denied for user: ... error:
MW ROOT@localhost
MW ROot@localhost

MW It looks like the host parameter is completely insensitive for cases, every 
combination of upper- and lowercase characters it taken.


MW To get it even more confusing, the values for user and host at the SHOW GRANTS FOR 
[user]@[host] are BOTH FULLY case-sensitive.
MW Only the exact values as beeing stored at the mysql system tables are taken.

MW The following statements does return values:
MW SHOW GRANTS FOR root@localhost

MW The following statements will NOT return values:
MW SHOW GRANTS for Root@localhost
MW SHOW GRANTS for root@Localhost

MW Personnaly I think the same case-sensitivety behaviour should be implemented in 
every aspect of the database functionallity.
MW If connecting as Root@LOCalhOST works a SHOW GRANTS FOR Root@LOCalhOST should work 
as well.

What OS do you use? I tested your examples on 4.0.3-max on Win and
RedHat and all worked well. I got Access denied error in any case
except root@localhost when I try to connect and SHOW GRANTS also
worked as well:

mysql show grants for 'Root'@'localhost';
ERROR 1141: There is no such grant defined for user 'Root' on host 'localhost'
mysql show grants for 'root'@'Localhost';
ERROR 1141: There is no such grant defined for user 'root' on host 'Localhost'


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Case sensitivety behaviour

2002-09-23 Thread Jan Steinman

From: Moestl, Wolfgang [EMAIL PROTECTED]

Is there a defined behaviour for handling the case-sensitivety for user- and 
hostnames?

According to the specification for the Domain Name System (DNS), Internet hostnames 
are always supposed to be case-insensitive.

Since other entities in MySQL are case-sensitive, this may seem inconsistent, but it 
is imposed by international standards. It is NOT under the control of MySQL.

To get it even more confusing, the values for user and host at the SHOW GRANTS FOR 
[user]@[host] are BOTH FULLY case-sensitive.

If verified, this is a bug. DNS-based hostnames should NEVER be case-sensitive.

The fact that you observed this using the magic hostname localhost may indicate 
that MySQL is cheating by doing its own management of this unique name. Any other 
fully qualified domain name should go through your operating system's address 
resolver, and had better be case-insensitive!

On UNIX and clones: nslookup localhost nslookup Localhost and nslookup LoCaLhOsT 
all answer the same IP.

If case-insensitivity with localhost is important, you might just map some other 
name to your machine and use that instead. This is also a good policy in case you 
later want to move your database to its own machine. For example, I have data 
defined as a CNAME in DNS for the machine I'd normally refer to as localhost. It 
seems to work -- as it should -- if I call it data, Data, dATA, etc.

-- 
: Jan Steinman -- nature photography: http://www.Bytesmiths.com
: Bytesmiths -- artists' services: http://www.Bytesmiths.com/Services
: Join the forums at http://www.Bytesmiths.com/wiki


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Case sensitivety behaviour

2002-09-23 Thread Paul DuBois

At 16:43 -0700 9/23/02, Jan Steinman wrote:
  From: Moestl, Wolfgang [EMAIL PROTECTED]

Is there a defined behaviour for handling the case-sensitivety for 
user- and hostnames?

According to the specification for the Domain Name System (DNS), 
Internet hostnames are always supposed to be case-insensitive.

Since other entities in MySQL are case-sensitive, this may seem 
inconsistent, but it is imposed by international standards. It is 
NOT under the control of MySQL.

To get it even more confusing, the values for user and host at the 
SHOW GRANTS FOR [user]@[host] are BOTH FULLY case-sensitive.

If verified, this is a bug. DNS-based hostnames should NEVER be 
case-sensitive.

MySQL behaves like this:

Usernames, passwords, and database and table names are case sensitive in
grant table entries.

Hostnames and column names are not.


The fact that you observed this using the magic hostname 
localhost may indicate that MySQL is cheating by doing its own 
management of this unique name. Any other fully qualified domain 
name should go through your operating system's address resolver, and 
had better be case-insensitive!

localhost is indeed interpreted specially in MySQL.  On UNIX, it means
connect using the UNIX domain socket rather than TCP/IP.  So in this
case, DNS is not involved.

In any case, I do not observe a difference between setting up
user accounts using host 'localhost' versus 'LOCALHOST'.

I *do* observe case sensitive hostname behavior for SHOW GRANTS.
This should not be.  I'll ask about it.


On UNIX and clones: nslookup localhost nslookup Localhost and 
nslookup LoCaLhOsT all answer the same IP.

If case-insensitivity with localhost is important, you might just 
map some other name to your machine and use that instead. This is 
also a good policy in case you later want to move your database to 
its own machine. For example, I have data defined as a CNAME in 
DNS for the machine I'd normally refer to as localhost. It seems 
to work -- as it should -- if I call it data, Data, dATA, etc.

--
: Jan Steinman -- nature photography: http://www.Bytesmiths.com
: Bytesmiths -- artists' services: http://www.Bytesmiths.com/Services
: Join the forums at http://www.Bytesmiths.com/wiki


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php