ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### **查询授予用户(user_test)的权限** 方法一: ``` show grants for user_test; ``` 方法二: ``` select * from mysql.user where user='user_test'\G; 或 SELECT DISTINCT CONCAT('User: [', user, '''@''', host, '];') AS USER_HOST FROM mysql.user; ``` ### **查询用户信息** ~~~ SELECT User, Host, Password FROM mysql.user; ~~~ ### **查看端口** ``` show global variables like 'port'; ```