当前位置:Gxlcms > 数据库问题 > mysql批量刷新用户密码

mysql批量刷新用户密码

时间:2021-07-01 10:21:17 帮助过:27人阅读

不知道用户密码,并且不改变用户密码的情况下,批量刷新MySQL数据库用户的密码

select concat(‘alter user \‘‘,user,‘\‘@\‘‘,host,‘\‘ identified by \‘‘,authentication_string,‘\‘;‘) as change_password from mysql.user;

 

扩展:

在其他MySQL实例创建与本实例密码相同的用户

select concat(‘create user \‘‘,user,‘\‘@\‘‘,host,‘\‘ identified by password \‘‘,authentication_string,‘\‘;‘) as alteruser from mysql.user;

 

mysql批量刷新用户密码

标签:host   sql数据库   cat   情况   实例   密码   string   sql   select   

人气教程排行