Guest User

Untitled

a guest
Nov 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. connection = DriverManager.getConnection("jdbc:mysql://**localhost**/**bajaj**","**root**", "**root**");
  2.  
  3. sed -i "s|://localhost/bajaj|://${HOSTNAME}/${DBNAME}|" DbConnection.java
  4.  
  5. sed -i "s|"jdbc:mysql://localhost/bajaj","root", "root"|"jdbc:mysql://${HOSTNAME}/${DBNAME}","${DBUSERNAME}", "${DBPASSWORD}"|" DbConnection.java
  6.  
  7. sed -i "s|"jdbc:mysql:...
  8. Ends here-^
  9.  
  10. sed -i "s|"jdbc:mysql://localhost/bajaj","root", "root"|"jdbc:mysql://${HOSTNAME}/${DBNAME}","${DBUSERNAME}", "${DBPASSWORD}"|" DbConnection.java
  11.  
  12. 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