List:General Discussion« Previous MessageNext Message »
From:Jan Steinman Date:September 23 2002 11:43pm
Subject:Re: Case sensitivety behaviour
View as plain text  
>From: "Moestl, Wolfgang" <Wolfgang.Moestl@stripped>
>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: <>
: Bytesmiths -- artists' services: <>
: Join the forums at <>

Case sensitivety behaviourWolfgang Moestl23 Sep
  • re: Case sensitivety behaviourVictoria Reznichenko23 Sep
Re: Case sensitivety behaviourJan Steinman24 Sep
  • Re: Case sensitivety behaviourPaul DuBois24 Sep
    • Re: Case sensitivety behaviour [followup re: bugfix]Paul DuBois26 Sep