Boa noite pessoal,
Uso o ubuntu 22.04.3 LTS, instalei o mysql, segui os processos da aula, mas qdo vou conetar aparecem essas msgs no log:
..... org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unable to obtain connection from database: Access denied for user 'root'@'localhost'
.....Caused by: org.flywaydb.core.internal.exception.FlywaySqlException: Unable to obtain connection from database: Access denied for user 'root'@'localhost'
application.properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost/vollmed_api
spring.datasource.username=root
spring.datasource.password=root
service mysql status
● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2023-09-29 19:04:44 -03; 1h 3min ago Process: 4627 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 4635 (mysqld) Status: "Server is operational" Tasks: 39 (limit: 18858) Memory: 366.6M CPU: 36.333s CGroup: /system.slice/mysql.service └─4635 /usr/sbin/mysqld
no terminal qundo tento acessar: mysql -u root -p
Enter password: ERROR 1698 (28000): Access denied for user 'root'@'localhost'
só acesso assim: sudo mysql -u root -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 21 Server version: 8.0.34-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Agradeço a desde já !