Password expiration policy in MySQL Server 5.7
原理
http://www.tuicool.com/articles/N7fuea
批量腳本
mysql -uroot -p‘xx‘ -e "select user,host from mysql.user;">/root/user.txt sed -i ‘1d‘ user.txt #sed -i ‘s/[ ][ ]*/@/g‘ user.txt sed -i ‘s/\s\+/@/g‘ user.txt cat alter.sh #!/bin/bash for i in `cat user.txt` do name=`echo $i|awk -F [email protected] ‘{print $1}‘` ip=`echo $i|awk -F [email protected]
本文出自 “python 運維” 博客,謝絕轉載!
Password expiration policy in MySQL Server 5.7