Exception: com. Mysql. JDBC. Exceptions. Jdbc4. MySQLNonTransientConnectionException: the Client does not support authentication protocol requested by server. Consider upgrading the MySQL client
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0 (Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance (NativeConstructorAccessorImpl. Java: 62)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance (DelegatingConstructorAccessorImpl. Java: 45)
The at Java. Lang. Reflect. Constructor. NewInstance (423) Constructor. Java:
At com. Mysql. JDBC. Util. HandleNewInstance (Util. Java: 411)
At com. Mysql. JDBC. Util. GetInstance (Util. Java: 386)
At com. Mysql. JDBC. SQLError. CreateSQLException (SQLError. Java: 1013)
At com. Mysql. JDBC. MysqlIO. CheckErrorPacket (MysqlIO. Java: 3597)
At com. Mysql. JDBC. MysqlIO. CheckErrorPacket (MysqlIO. Java: 3529)
At com. Mysql. JDBC. MysqlIO. CheckErrorPacket (MysqlIO. Java: 935)
At com. Mysql. JDBC. MysqlIO. SecureAuth411 (MysqlIO. Java: 4101)
At com. Mysql. JDBC. MysqlIO. DoHandshake (MysqlIO. Java: 1300)
At com. Mysql. JDBC. ConnectionImpl. CoreConnect (ConnectionImpl. Java: 2337)
At com. Mysql. JDBC. ConnectionImpl. ConnectOneTryOnly (ConnectionImpl. Java: 2370)
At com. Mysql. JDBC. ConnectionImpl. CreateNewIO (ConnectionImpl. Java: 2154)
At com. Mysql. JDBC. ConnectionImpl. & lt; init> (ConnectionImpl. Java: 792)
At com. Mysql. JDBC. JDBC4Connection. & lt; init> (JDBC4Connection. Java: 47)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0 (Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance (NativeConstructorAccessorImpl. Java: 62)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance (DelegatingConstructorAccessorImpl. Java: 45)
The at Java. Lang. Reflect. Constructor. NewInstance (423) Constructor. Java:
At com. Mysql. JDBC. Util. HandleNewInstance (Util. Java: 411)
At com. Mysql. JDBC. ConnectionImpl. GetInstance (ConnectionImpl. Java: 381)
At com. Mysql. JDBC. NonRegisteringDriver. Connect (NonRegisteringDriver. Java: 305)
The at Java. SQL. DriverManager. GetConnection (DriverManager. Java: 664)
The at Java. SQL. DriverManager. GetConnection (DriverManager. Java: 270)
At com. Wu. JDBC. Out. Update (out. Java: 17)
At com. Wu. JDBC. Out. The main (48) out. Java:
Using Navicat for mysql visualization operation:
Mysql version:
* * * * * * * * * * * * * * * * * * * *
* General Information
* * * * * * * * * * * * * * * * * * * *
Server type: MySQL
Connection name: MYSQL
Host name or IP address: localhost
Port: 3307
User name: root
Save password: True
* * * * * * * * * * * * * * * * * * * *
* the Advanced Information
* * * * * * * * * * * * * * * * * * * *
Set the location: C: \ Users \ TP007 \ Documents \ Navicat \ MySQL \ servers \ MySQL
Code: 65001 (utf-8)
Keep the connection interval (in seconds) : N/A
Using MySQL character set: True
Use compression: False
Automatic connection: False
Use the advanced connection: False
* * * * * * * * * * * * * * * * * * * *
* the SSL Information
* * * * * * * * * * * * * * * * * * * *
Use SSL: False
Use validation: False
The client keys:
The client certificate:
The CA certificate:
* * * * * * * * * * * * * * * * * * * *
* SSH Information
* * * * * * * * * * * * * * * * * * * *
Use SSH channel: False
Host name or IP address:
Port: 22
Username:
Authentication methods: password
Save password: False
* * * * * * * * * * * * * * * * * * * *
* HTTP Information
* * * * * * * * * * * * * * * * * * * *
Use HTTP channel: False
Channel address:
Use base64 encoding from query: False
Use password authentication: False
Username:
Save password: False
Use certificate authentication: False
The client keys:
The client certificate:
The CA certificate:
Use the Proxy: False
The proxy server host:
The proxy server port: 0
The proxy server user name:
The proxy server to save password: False
* * * * * * * * * * * * * * * * * * * *
* Other Information
* * * * * * * * * * * * * * * * * * * *
The server version: 8.0.16
Protocol: 10
Information: localhost via TCP/IP
Drive is also this version, and with the idea to create a second student table in the database, the next seconds to create a new class to add data not line!
Error message is the client does not support the server requests authentication protocol; Please consider to upgrade the MySQL client, how make this?
CodePudding user response:
This anomaly even tell you the solution, in version update mysql JDBC, server version is 8.0.16, JDBC is also using the same version,Exception class is com. The mysql. JDBC. Exceptions. Jdbc4. MySQLNonTransientConnectionException, this is 5. Just some exception class x version, no 8.0, said drive is the latest version,,,
MySQL 8.0 JDBC reference documentation
CodePudding user response: