启动ambari服务失败 报错java.sql.SQLException: Access denied for user ‘ambari‘@‘master‘ (using password: YES)

启动ambari服务失败,提示:

Waiting for server start…ERROR: Exiting with exit code -1.
REASON: Ambari Server java process has stopped. Please check the logs for more information.

启动ambari服务失败 报错java.sql.SQLException: Access denied for user ‘ambari‘@‘master‘ (using password: YES)_第1张图片
查看日志:

tail -200 /var/log/ambari-server/ambari-server.log 

启动ambari服务失败 报错java.sql.SQLException: Access denied for user ‘ambari‘@‘master‘ (using password: YES)_第2张图片
发现报错:java.sql.SQLException: Access denied for user ‘ambari’@‘master’ (using password: YES)

这是MySQL抛出的异常,意思是用户的访问被拒绝,可能是权限问题,我们在数据库中给用户授权:

grant all privileges on *.* to ambari@'localhost' identified by 'bigdata';

启动ambari服务失败 报错java.sql.SQLException: Access denied for user ‘ambari‘@‘master‘ (using password: YES)_第3张图片
再次启动ambari服务
启动ambari服务失败 报错java.sql.SQLException: Access denied for user ‘ambari‘@‘master‘ (using password: YES)_第4张图片
成功启动。

你可能感兴趣的:(Linux,数据库,linux,数据库,mysql,java)