forked from shivaaws69/Wisdom-School-Spring-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb_config
More file actions
19 lines (18 loc) · 662 Bytes
/
db_config
File metadata and controls
19 lines (18 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mysql -u root -p
CREATE DATABASE wisdomschool;
SHOW DATABASES;
CREATE USER 'springuser'@'%' IDENTIFIED BY 'springpassword';
GRANT ALL PRIVILEGES ON wisdomschool.* TO 'springuser'@'%';
FLUSH PRIVILEGES;
EXIT;
# Database connection properties
spring.datasource.url=jdbc:mysql://<SERVER_IP>:3306/wisdomschool
spring.datasource.username=springuser
spring.datasource.password=springpassword
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
sudo systemctl restart mysql
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 127.0.0.1 change to 0.0.0.0
sudo systemctl restart mysql