i have a really serious issue and i cannot continue my task for two days know. I use docker and mysql server. I have the docker-compose.yml file which this:
version: '2'
services:
mongoDb:
image: mongo:latest
container_name: myproject-mongodb
ports:
- "27017:27017"
mssql:
image: mysql/mysql-server:8.0
container_name: myproject-mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 'pass'
MYSQL_DATABASE: 'myproject'
MYSQL_USER: 'myproject'
MYSQL_PASSWORD: 'alex1234!'
The docker images are being created successfully. Using dbeaver client i set up the connection using mysql driver of course and the exact credentials: server host: localhost port: 3306 Database: myproject User name: myproject password: 'alex1234!' Also i set the in the driver properties the allowPublicKeyRetrieval to true and the connection is established. Now in my intellij in application.properties file i have the exact same things:
#MySql WebMvcConfiguration.java
spring.datasource.url=jdbc:mysql://localhost:3306/myproject?allowPublicKeyRetrieval=true
spring.datasource.username=myproject
spring.datasource.password=alex1234!
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
hibernate.dialect = org.hibernate.dialect.MySQLDialect
hibernate.show_sql = true
and when i ran the application im facing this error:
Authentication plugin 'caching_sha2_password' cannot be loaded
Why is this happening? I've also try some solutions ALTER USER 'username'@'ip_address' IDENTIFIED WITH mysql_native_password By 'password';
but nothing. Please help