-
Notifications
You must be signed in to change notification settings - Fork 8
/
petcliic.txt
56 lines (33 loc) · 1.76 KB
/
petcliic.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
yum install mysql
mysql -h <rds end point url > -u <dbusername> -p
create database petclinic;
show databases;
use petclinic;
show tables;
5)Create a petclinic db in mysql. ( CREATE DATABASE petclinic;)
6) Download the war file from your s3 url and upload into tomcat webapps.(tomcat has to be running status and access petclinic once)
7)stop tomcat and from webapps folder delete/move the petclinic.war( now you have petclinic expldoed directory in webapps folder)
8)in webapps/petclinic/WEB-INF/classes/db/mysql/initDB.sql ( update the db username and password 2 lines)
for ex: GRANT ALL PRIVILEGES ON petclinic.* TO root@localhost IDENTIFIED BY 'Login@123';
9)update data-access.prop with mysql entries.
petclinic/WEB-INF/classes/spring
remove all HQL and MS-SQL. ( keep only mysql lines and remove #(comments))
for ex:
jpa.showSql=true
#-------------------------------------------------------------------------------
# MySQL Settings
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/petclinic
jdbc.username=root
jdbc.password=Login@123
# Properties that control the population of schema and data for a new data source
jdbc.initLocation=classpath:db/mysql/initDB.sql
jdbc.dataLocation=classpath:db/mysql/populateDB.sql
# Property that determines which Hibernate dialect to use
# (only applied with "applicationContext-hibernate.xml")
hibernate.dialect=org.hibernate.dialect.MySQLDialect
# Property that determines which database to use with an AbstractJpaVendorAdapter
jpa.database=MYSQL
10)next download the mysql connector jar and place it in tomcat/lib.
mysql-connector-java-5.1.5-bin.jar
11) start the tomcat and find if any errors are comming related to mysql(SQLSEver exceptions ignore)