SoFunction
Updated on 2025-04-07

Spring boot using mysql instance detailed explanation

Spring boot using mysql instance detailed explanation

You can use H2 in the development stage. When online, switch to mysql through the following configuration, spring boot will use this configuration to override the default H2.

1. Create a database:

mysql -u root
CREATE DATABASE springbootdb

:

<dependency>
     <groupId>mysql</groupId>
     <artifactId>mysql-connector-java</artifactId>
   </dependency>

:

= jdbc:mysql://localhost:3306/springbootdb
=root
=
-auto=create-drop//none, validate, update, create-drop

Thank you for reading, I hope it can help you. Thank you for your support for this site!