ana*_*nik 0 mysql authentication
我需要对新服务器运行自动检查.其中一项检查是检测是否设置了用户(或root)密码.但..
mysql> SELECT host, user, password FROM mysql.user;
ERROR 1054 (42S22): Unknown column 'password' in 'field list'
Run Code Online (Sandbox Code Playgroud)
服务器版本:5.7.18-0ubuntu0.17.04.1(Ubuntu)
MySQL版本5.7或更高版本在mysql.user表中没有名为password的列.MySQL 5.7或更高版本使用列authentication_string代替.
所以你的查询应该是:
SELECT host, user, authentication_string FROM mysql.user
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3581 次 |
| 最近记录: |