0

The code for the connection is like this.

String url=jdbc:mysql://127.0.0.1:3306/test
Connection conn = DriverManager.getConnection(url, user,  password);

But in reality the database test does not exist,and I don’t know what the name of the target database is.

How to connect to the target and create a database

asd21d32a
  • 59
  • 4
  • IIRC, MySQL allows you to connect without database, that is `jdbc:mysql://127.0.0.1:3306`, then you can execute a `create database` statement. – Mark Rotteveel Dec 23 '21 at 08:57

0 Answers0