Home > Database > Mysql Tutorial > 在MySQL中生成随机密码的方法_MySQL

在MySQL中生成随机密码的方法_MySQL

WBOY
Release: 2016-06-01 13:00:49
Original
1067 people have browsed it

cat /dev/urandom | LC_ALL=C tr -dc "[:alnum:]" | fold -w 10 |head -10

Copy after login

Si1N9kUyuZ
ddzsRXFgxA
caDRBRT4Px
buGk6LkX4d
N5Xod1TOyr
1645cBxAjl
KRjwJR2Txu
nhQedXagL9
RraDEZgfhY
QxCurm5eZF

参数说明:

201559113510699.jpg (762×507)

如果需要特别复杂的密码可以试一下:

cat /dev/urandom | LC_ALL=C tr -dc "[:graph:]" | fold -w 10 |head -10

 
cat /dev/urandom | LC_ALL=C tr -dc "[:graph:]" | fold -w 10 |head -10
Copy after login

y#@uDo.g-w
RP\oq.8?)e
2R~CCIsLPr
*/V4″%H9WE
!iP2Jj:vqL
zb!w}DZ|lN
2*%|/;X$?>
R7;-Bam|~L
Ps83,_`8Xz
C?mnpUzn*I

另一种方法可以利用uuid 来产生一个密码,一次只能产生一个:

cat /proc/sys/kernel/random/uuid|tr -d "-"


cat /proc/sys/kernel/random/uuid|tr -d "-"

Copy after login

d9d01c59d22f4ebbac16b759103f4fc6

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template