The specified database user/password combination is rejected: com.mysql.cj.exceptions.CJException:

Problem Description

The JAVA environment
reports an error when connecting to the database, and the message is as follows The specified database user/password combination is rejected: com.mysql.cj.exceptions.CJException: Access denied for user'root'@'192.168.235.1' (using password: YES)
mark

problem solved

1. Add remote access permissions to the database

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

FLUSH PRIVILEGES;

2. Restart connection database access

mark

Guess you like

Origin blog.csdn.net/weixin_39608791/article/details/108323651