Input the following commands in order in the terminal.
cd /usr/local/mysql/bin
./mysql -u root -p
How to check current data bases
show databases;
How to add new database
create database new_db_name;
How to delete/drop database
drop database db_to_remove;
Add the following in 'applications.properties'
spring.datasource.url=jdbc:mysql://localhost:3306/memo
spring.datasource.username=root
spring.datasource.password=Sungju0909!
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
Add the SQL specific dependencies in 'build.gradle'
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// MySQL - add these dependencies
implementation 'mysql:mysql-connector-java:8.0.28'
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
}
Type the following commands with your user name and email in the terminal or the CMD.
git config --global user.name "Robbie"
git config --global user.email "Robbie@email.com"