Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- connection = DriverManager.getConnection("jdbc:mysql://**localhost**/**bajaj**","**root**", "**root**");
- sed -i "s|://localhost/bajaj|://${HOSTNAME}/${DBNAME}|" DbConnection.java
- sed -i "s|"jdbc:mysql://localhost/bajaj","root", "root"|"jdbc:mysql://${HOSTNAME}/${DBNAME}","${DBUSERNAME}", "${DBPASSWORD}"|" DbConnection.java
- sed -i "s|"jdbc:mysql:...
- Ends here-^
- sed -i "s|"jdbc:mysql://localhost/bajaj","root", "root"|"jdbc:mysql://${HOSTNAME}/${DBNAME}","${DBUSERNAME}", "${DBPASSWORD}"|" DbConnection.java
- sed -i 's|"jdbc:mysql://localhost/bajaj","root", "root"|"jdbc:mysql://'"${HOSTNAME}"'/'"${DBNAME}"'","'"${DBUSERNAME}"'", "'"${DBPASSWORD}"'"|' DbConnection.java
Add Comment
Please, Sign In to add comment