Hi everyone,

well, my problem would be:There is a database server which contains no databases. So there is nothing to connect to (as it is needed by the DriverManager.getConnection instruction). How can I create a new database under these circumstances?

Thanks,

Chaster

With installation of MySQL server by default you get these databases mysql and information_schema (as long admin did not remove them). Simply use them in connection string and then execute create database command like in this example

Hi everyone,

well, my problem would be:There is a database server which contains no databases. So there is nothing to connect to (as it is needed by the DriverManager.getConnection instruction). How can I create a new database under these circumstances?

Thanks,

Chaster

try logging into your database

>mysql -u root -p [whatever_your_password]

Once you're in, just do this:

> create database [your_database_name]

Let me know if you get stuck, I'll try to help.

Josh

With installation of MySQL server by default you get these databases mysql and information_schema (as long admin did not remove them). Simply use them in connection string and then execute create database command like in this example

Thanks a lot, that did the trick...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.