Question:
The problem encountered in the project is very strange. MySQL database is installed on CentOS, and the project is spring boot.
When the project is started locally, it is normal to connect to the server database, the local database client is normal to connect to the server database, and the server is normal to connect to the client database. When the project is deployed to the server, an exception is thrown.
A lot of misinformation..
The most important thing is:
java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES)
reason:
I forgot to repack every time you run a project, idea will not help you repackage it. You need to do it yourself
Other questions can be referred to
https://www.cnblogs.com/secbro/p/12544158.html
Read More:
- The server just without updating PID file and can’t connect to local MySQL server through socket are solved
- When the springcloud obtains the cloud link database information, an error is reported: errorcode 1045, state 28000
- Does the version of idea2020.1 import mybayis jar package or report an error? Error: (4,28) Java: package org.apache.ibatis.io does not exist
- Winscp failed to upload the file to the server, indicating permission denied with return code 3
- How to select the jar package version for Maven package when the jar package versions referenced by multiple modules are inconsistent
- Solve the problem of There was an unexpected error (type=Internal Server Error, status=500) (using Thymeleaf to report an error)
- PHP under linux uses pdo-dblib to connect to mssql to report an error solution. Error message: SQLSTATE[01002] Adaptive Server connection failed (severity 9)
- Could not create connection to database server. Attempted reconnect 3 times. Giving
- Zip to decompress the jar package, like the add file in the jar package
- 2003 – Can‘t connect to MySQL server on ‘192.168.163.128‘(Unknown error )
- Failed to upload report – An error has occurred. Please contact your administrator
- scalac: Token not found: C:\Users\User\AppData\Local\JetBrains\IntelliJIdea2020.3\compile-server\to
- Docker builds the pit that Seata stepped on. can not connect to services-server
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- Dm7 Dameng database dmrman reports an error OS_ pipe2_ conn_ Server open failed solution
- Failed to get the resources path in the jar package, reporting an error null pointer
- node.js Server MySQL database connection timeout (error: connect etimeout)
- It can’t connect to local MySQL server through socket ‘/ tmp/ mysql.sock ‘(2) “;
- CentOS Liunx 7 uses rdesktop to remotely connect to the Alibaba Cloud server and it appears Failed to connect, CredSSP required by server.
- MariaDB startup error: Failed to start MariaDB database server