Home > database >  Using the IDEA of MVC based on Maven program written to access MySql
Using the IDEA of MVC based on Maven program written to access MySql

Time:09-17

Problem description is as follows:
Unable to connect to the database in the IDEA to run the program, and every 1 second prompt unable to connect to the database
But when I use Navicat Premium double-click the MySql database to open the database in the navigation bar on the left side of the database, program immediately connect success

I have separate distribution database account, and assign all permissions, but still problems and situation, the database is MySql8.0 this problem I was having a headache

The root user has the remote
Error message is as follows:

20:57:51, 422 ERROR DruidDataSource: 2469 - create connection SQLException, url: JDBC: mysql://127.0.0.1:3306/mysql? ServerTimezone=GMT& UseSSL=false& AllowPublicKeyRetrieval=true, errorCode 1045, the state 28000
Java. SQL. SQLException: Access denied for user 'root' @ 'localhost' (using password: YES)
At com. Mysql. Cj. JDBC. Exceptions. SQLError. CreateSQLException (SQLError. Java: 127)
At com. Mysql. Cj. JDBC. Exceptions. SQLError. CreateSQLException (SQLError. Java: 95)
At com. Mysql. Cj. JDBC. Exceptions. SQLExceptionsMapping. TranslateException (SQLExceptionsMapping. Java: 122)
At com. Mysql. Cj. JDBC. ConnectionImpl. CreateNewIO (ConnectionImpl. Java: 874)
At com. Mysql. Cj. JDBC. ConnectionImpl. & lt; init> (ConnectionImpl. Java: 456)
At com. Mysql. Cj. JDBC. ConnectionImpl. GetInstance (ConnectionImpl. Java: 234)
At com. Mysql. Cj. JDBC. NonRegisteringDriver. Connect (NonRegisteringDriver. Java: 227)
At com. Alibaba. Druid. Pool. DruidAbstractDataSource. CreatePhysicalConnection (DruidAbstractDataSource. Java: 1513)
At com. Alibaba. Druid. Pool. DruidAbstractDataSource. CreatePhysicalConnection (DruidAbstractDataSource. Java: 1578)
At com. Alibaba. Druid. Pool. DruidDataSource $CreateConnectionThread. Run (DruidDataSource. Java: 2466)

CodePudding user response:

Root has the remote, but from the point of error is the Root @ localhost, local connection failure, does not use the remote Root, whether the address configuration problems

CodePudding user response:

By bumps bumps bumps bumps bumps bumps bumps bumps bumps bumps bumps by v
  • Related