I have a class wich connects to MySQL database. I want to make it more universal. I'm not sure in myself. My class can connect any server if you specify the database name.
String url="jdbc:mysql://"+host+":"+port+"/"+dbname;
Can someone tell me, how can I connect without the specifying the database name(to use create database command for example)? Is it correct to use:
String url="jdbc:mysql://"+host+":"+port
or it uses other syntax? Thanks in advance!