(1)测试联通性时报Access denied for user
Root用户没有权限导致的
给root用户添加权限后测试通过
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'hdp123456'
Access denied for user 'root'@'%' to database 'rangerkms' ErrorCode: 1044
(2)登录mysql查看权限
mysql> SELECT host,user,authentication_string,Grant_priv,Super_priv FROM mysql.user;
可以看到授权的权限没有打开,修复下
打开权限
UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root';
FLUSH PRIVILEGES;