Monday, November 2, 2009

mysql random password

I needed a quick way to create a random password for a large number of users in mysql.


SELECT SUBSTRING( MD5( RAND() ) FROM 1 FOR 8 ) AS PASSWORD;

No comments:

Post a Comment