Solutions to access denied for user ‘xxx’ @’localhost ‘problem
Key to error reporting
java.sql.SQLException : access denied for user ‘xxx’ @’localhost ‘(using password: Yes). Note that XXX here is not root, root is a permission problem
Solution
Change the user name for the configuration file
You can choose any name you like
And then 🆗 It’s over
Cause analysis
The framework did not get the correct user name of datasource, which is related to the configuration. When such a framework constructs an instance of abstractdriverbaseddatasource, the user name it gets is always the current machine name, that is, XXX. The underlying reason is not clear.
Read More:
- ER_ACCESS_DENIED_ERROR: Access denied for user ‘root‘@‘localhost‘ (using password: NO)
- Error 1045 (28000): solution to access denied for user ‘root’ @’localhost ‘(using password: no)
- Error code 1045, state 28000, Java sql.SQLException :Access denied for user ‘root’@’localhost’
- Solve MySQL error 1698 (28000): access denied for user ‘root’ @’localhost ‘
- ERROR 1045 (28000): Access denied for user’ODBC’@localhost (using password: NO)209150;’211503;’
- Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)
- MySQL connection error access denied for user ‘root’ @ ‘localhost‘
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’
- Error 1045 (28000) access denied for user ‘root’ @’localhost ‘appears in MySQL under Windows system
- MySQL startup problem (ERROR 1045 (28000): Access denied for user’ODBC’@’localhost’ (using password: NO))
- Error in Git operation: http basic: access denied solution
- Win32 Disk Imager Error 5: Access is Denied solution
- 【docker】 denied: requested access to the resource is denied
- Make the root user login through SSH and report the error of “permission denied, please try again”
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- MySQL Access denied
- HTTP Basic: Access denied
- Mysql Error:The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exist
- git remote: HTTP Basic: Access denied error resolution