mysql - how the command 'use database-name' is using java code -


i make o program store data excel files in databases. have plenty of databases in program have choose in 1 store data. have made code able connect mysql program , show available databases. in database store data. more specific user first of see tha available databases in client , afterwards have chance in database data stored. me how this?

the code see available databases below:

class.forname("com.mysql.jdbc.driver");         connection con = (connection) drivermanager.getconnection(                 "jdbc:mysql://localhost:3306/", "root", "root");         databasemetadata meta = (databasemetadata) con.getmetadata();         resultset res = meta.getcatalogs();         system.out.println("list of databases: ");         while (res.next()){             system.out.println (" " +res.getstring(1));     } 

thank in advance!

i hope this link should . can data connection object


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -