Mysql
 sql >> Base de données >  >> RDS >> Mysql

Sauvegarder les utilisateurs MySQL

mysql -BNe "select concat('\'',user,'\'@\'',host,'\'') from mysql.user where user != 'root'" | \
while read uh; do mysql -BNe "show grants for $uh" | sed 's/$/;/; s/\\\\/\\/g'; done > grants.sql