JDBC with several databases (mysql)
I'm working with JDBC and MySQL and I have a question about it.
As I understand, when we are creating connection, we should point url which looks like:
But if after some action I want to change the database (which is done in mysql as "USE another_database;"),
should I create new connection for it or I can change the existing connection(if yes then how?)?
Thank you, I will wait for a response
Re: JDBC with several databases (mysql)
you must add dataBase JDBC Driver for example(ORACLE) to project and change Connection URL(Class.forName(" ") & DriverManeger.getConnection(" ")) to new Data Base.