Re: Maximum Password length?

2001-03-01 Thread Basil Hussain

Hi,

 My apologies if this is an easy question. I've looked at the docs in the
 privilege section and haven't found a mention of the max length of password
 for MySQL. I want to set a fairly long one for each of my web servers that
 will be hitting my database server. Incase it is important, I'm running
 3.23.33 on Redhat 7.0.
 
 Anyone know how long they can go?

 From the 'user' table in the 'mysql' database:
 mysql describe user;
 +-+---+--+-+-+---+
 | Field   | Type  | Null | Key | Default | Extra |
 +-+---+--+-+-+---+
 | Host| char(60)  |  | PRI | |   |
 | User| char(16)  |  | PRI | |   |
 | password| char(16)  |  | | |   |
 .
 
 Looks like it is 16? :)

That's not quite right, actually. Yes, the field in the 'user' table is 16
characters, but MySQL doesn't actually store the original password there.
What it stores is a crytographic cipher of the password, created using the
PASSWORD() function (which is why you must specify the password using that
function when changing passwords).

So, no matter what password you specify for an user, the string stored in
the 'user' table will always be 16 characters. Let me illustrate with a
quick example:

mysql select password('blah') as crypto;
+--+
| crypto   |
+--+
| 652f9c175d1914f9 |
+--+
1 row in set (0.00 sec)

mysql select 
password('kjsdhfaheiehafiaefajfjaslkfnvfmnglsdahewijfioejfoiaewjfwea') as
crypto;
+--+
| crypto   |
+--+
| 4d88ee387b92a03e |
+--+
1 row in set (0.00 sec)

But anyway, to answer the original question - it's unlikely that any
limitations will be encountered with the lengths of passwords that are
planned to be used.

The only likely limit I can think of would be that of any buffers in the
MySQL query parsing routines or those in the code for the PASSWORD()
function. Any MySQL developers care to comment on this, just out of
interest?

Regards,


Basil Hussain ([EMAIL PROTECTED])


-
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: Maximum Password length?

2001-02-28 Thread Atle Veka


From the 'user' table in the 'mysql' database:
mysql describe user;
+-+---+--+-+-+---+
| Field   | Type  | Null | Key | Default | Extra |
+-+---+--+-+-+---+
| Host| char(60)  |  | PRI | |   |
| User| char(16)  |  | PRI | |   |
| password| char(16)  |  | | |   |
.

Looks like it is 16? :)
(You might be able to alter this yourself, BUT I will not guarantee that
it won't break anything)


Atle

On Wed, 28 Feb 2001, Tyrone Mills wrote:

 My apologies if this is an easy question. I've looked at the docs in the
 privilege section and haven't found a mention of the max length of password
 for MySQL. I want to set a fairly long one for each of my web servers that
 will be hitting my database server. Incase it is important, I'm running
 3.23.33 on Redhat 7.0.
 
 Anyone know how long they can go?
 
 Thanks,
 
 Tyrone
 ___
 
 
 UNIX is user-friendly, it's just picky about who its friends are... 
 
 
 


-
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