Showing posts with label mysql random password. Show all posts
Showing posts with label mysql random password. Show all posts

MySql Random password Generator

Below are the MySql functions which can be used to generate random passwords by including in the mysql query

First Method:

insert into employee (name,dob,userid,password) values ('Harryporter','2002-10-03','harry',substring(MD5(RAND()), -8));


Second Method:

insert into employee (name,dob,userid,password) values ('Harryporter','2002-10-03','harry',CONV(FLOOR(RAND() * 99999999999999), 10, 36));