1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #查看所有用户 select CONCAT( 'User:' , user , '@' ,host) from mysql. user ; 输出: | CONCAT( 'User:' , user , '@' ,host) | + -------------------------------+ | User :adam@% | | User :root@127.0.0.1 | | User :root@::1 | | User :adam@localhost | | User :quan@localhost | | User :root@localhost | + -------------------------------+ 6 rows in set (0.00 sec) #查看用户权限 show grants for 'adam' @ 'localhost' ; 输出: + -------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'adam' @ 'localhost' IDENTIFIED BY PASSWORD '*B2652B2C91E14A2B0088107BB28698EA57F78E01' | | GRANT ALL PRIVILEGES ON `wujin`.* TO 'adam' @ 'localhost' | + -------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) |
本文为Adamin90原创文章,转载无需和我联系,但请注明来自http://www.lixiaopeng.top