Open ashi509 opened 1 year ago
mysql -u root -p opening for cmd
//show all databases.
// create new database;
// use database
// create table in database
// check table create or not
// for checking table attribute
// insert data in database
// All data recieved of given table_name
// Recieved the id column;
// Recieved the name, city full column;
// Get Specific name row data;
// Given id table will be delete.
// For deleting table
//For deleting database.
//for deleting only table data not tables.
// for rename table name
// Get rename
// add new colunm
//insert new column data
// get data given id number
//from 1 to 19 get data id;
mysql -u root -p opening for cmd
//show all databases.
// create new database;
// use database
// create table in database
// check table create or not
// for checking table attribute
// insert data in database
// All data recieved of given table_name
// Recieved the id column;
// Recieved the name, city full column;
// Get Specific name row data;
// Given id table will be delete.
// For deleting table
//For deleting database.
//for deleting only table data not tables.
// for rename table name
// Get rename
// add new colunm
//insert new column data
// get data given id number
//from 1 to 19 get data id;
There are two way to connect the MySQL database.
First is application.property
add the configuration
spring.datasource.url="Jdbc:mysql://localhost:3306/db_name" spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name="com.mysql.cj.jdbc.Driver"
JPA
spring.jpa.properties.hibernate.dialect="org.hibernate.dialect.MySQL8Dialect" spring.hiberbnate.ddl-auto=update
Second one is application.yml file
spring: datasource: url: jdbc:mysql://localhost:3306/prop_accel username: root password: root driver: class-name: com.mysql.cj.jdbc.Driver jpa: properties: hibernate: dialect: org.hibernate.dialect.MySQL8Dialect hibernate: ddl-auto: update