forked from rajatpzade/studentapp.ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tomcat-rds-db01 - Copy.txt
29 lines (19 loc) · 1.22 KB
/
tomcat-rds-db01 - Copy.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
vim context.xml
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
maxTotal="100" maxIdle="30" maxWaitMillis="10000"
username="USERNAME" password="PASSWORD" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://DB-ENDPOINT:3306/DATABASE"/>
use studentapp;
CREATE TABLE if not exists students(student_id INT NOT NULL AUTO_INCREMENT,
student_name VARCHAR(100) NOT NULL,
student_addr VARCHAR(100) NOT NULL,
student_age VARCHAR(3) NOT NULL,
student_qual VARCHAR(20) NOT NULL,
student_percent VARCHAR(10) NOT NULL,
student_year_passed VARCHAR(10) NOT NULL,
PRIMARY KEY (student_id)
);
---------------------------------------------------------------------------------------------
#mysqldump -h database-1.cpio2plcbiwx.us-east-1.rds.amazonaws.com -u admin -p --databases studentapp > studetapp_backup.sql
#mysqldump -h database-1.cpio2plcbiwx.us-east-1.rds.amazonaws.com -u admin -p --databases studentapp --routines --no-data > studetapp_backup_nodata.sql
#mysqldump -h database-1.cpio2plcbiwx.us-east-1.rds.amazonaws.com -u admin -p --databases studentapp --no-create-info --skip-triggers > studetapp_backup_noschema.sql