#查看所有用户 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