Java::JavaSql::SQLException: null, message from server: "Host 'alex' is not allowed to connect to this MySQL server"
2058 com.mysql.jdbc.SQLError.createSQLException(com/mysql/jdbc/SQLError.java:965)
2058 com.mysql.jdbc.SQLError.createSQLException(com/mysql/jdbc/SQLError.java:898)
2058 com.mysql.jdbc.SQLError.createSQLException(com/mysql/jdbc/SQLError.java:887)
2058 com.mysql.jdbc.MysqlIO.doHandshake(com/mysql/jdbc/MysqlIO.java:1038)
因为es数据库部署在远端,mysql在本机
原因是是本机电脑mysql没有开放远端连接权限,需要修改mysql权限
mysql -uroot -proot
use mysql
select user, host from user;
update user set host = '%' where user = 'root';
select user, host from user;
flush privileges;
解决