Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot with Hikari Mysql Application startup #1

Open
tppalani opened this issue Apr 6, 2024 · 2 comments
Open

Spring Boot with Hikari Mysql Application startup #1

tppalani opened this issue Apr 6, 2024 · 2 comments

Comments

@tppalani
Copy link

tppalani commented Apr 6, 2024

Hi Team,

  1. Repo has been cloned.
  2. change directory - springboot-demo/hikari/
  3. started compose yaml in my windows instances.
  4. verify the mysql running container
$ podman ps
CONTAINER ID  IMAGE                                                  COMMAND     CREATED        STATUS        PORTS                   NAMES
58629dd9ad49  registry.cn-hangzhou.aliyuncs.com/zhengqing/mysql:5.7  mysqld      4 minutes ago  Up 4 minutes  0.0.0.0:3306->3306/tcp  mysql_3306


2024-04-06 23:23:54.851  INFO 26228 --- [           main] com.et.hikari.DemoApplication            : Starting DemoApplication on LDD4C6G3 with PID 26228 (C:\Users\palani\workspace\Hikari\springboot-demo\hikari\target\classes started by palani in C:\Users\palani\workspace\Hikari\springboot-demo\hikari)
2024-04-06 23:23:54.855  INFO 26228 --- [           main] com.et.hikari.DemoApplication            : The following profiles are active: basic
2024-04-06 23:23:55.646  INFO 26228 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-04-06 23:23:55.778  INFO 26228 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 84ms. Found 1 JPA repository interfaces.
2024-04-06 23:23:58.185  INFO 26228 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8088 (http)
2024-04-06 23:23:58.197  INFO 26228 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-04-06 23:23:58.197  INFO 26228 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.31]
2024-04-06 23:23:58.438  INFO 26228 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-04-06 23:23:58.438  INFO 26228 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3522 ms
2024-04-06 23:23:58.622  INFO 26228 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2024-04-06 23:24:00.081 ERROR 26228 --- [           main] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Exception during pool initialization.

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.5.RELEASE)

2024-04-06 23:14:50.291  INFO 42664 --- [           main] com.et.hikari.DemoApplication            : Starting DemoApplication on LDD4C6G3 with PID 42664 (C:\Users\palani\workspace\Hikari\springboot-demo\hikari\target\classes started by palani in C:\Users\palani\workspace\Hikari\springboot-demo\hikari)
2024-04-06 23:14:50.295  INFO 42664 --- [           main] com.et.hikari.DemoApplication            : The following profiles are active: basic
2024-04-06 23:14:51.220  INFO 42664 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-04-06 23:14:51.378  INFO 42664 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 103ms. Found 1 JPA repository interfaces.
2024-04-06 23:14:53.859  INFO 42664 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8088 (http)
2024-04-06 23:14:53.874  INFO 42664 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-04-06 23:14:53.875  INFO 42664 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.31]
2024-04-06 23:14:54.087  INFO 42664 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-04-06 23:14:54.090  INFO 42664 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3719 ms
2024-04-06 23:14:54.252  INFO 42664 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2024-04-06 23:14:55.662 ERROR 42664 --- [           main] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Exception during pool initialization.

java.sql.SQLException: Access denied for user 'sample'@'localhost' (using password: YES)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-c
@Harries
Copy link
Owner

Harries commented Apr 9, 2024

do you use local client to test mysql connection? datagrip or DBeaver

@Harries
Copy link
Owner

Harries commented Apr 9, 2024

check the mysql logs, is it any errors? docker logs ${containid}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants