How to create database?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
newyuppie
Posts: 13
Joined: Fri 07 Jul 2006 05:48

How to create database?

Post by newyuppie » Fri 07 Jul 2006 22:22

hi,

i was wondering how to create a new database in the host and port specified. my problem is that using MySQLDump or MySQLScript both require the MySQLConnection as input parameter, but MySQLConnection requires a database as parameter, so its a bit of a loop.

is there a way to connect to the host and port (no specified database) and execute a "CREATE DATABASE" statement?

thank you for the time
ny

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 10 Jul 2006 11:40

You may omit database name in a connection string.

newyuppie
Posts: 13
Joined: Fri 07 Jul 2006 05:48

Post by newyuppie » Mon 10 Jul 2006 13:36

thank you

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 10 Jul 2006 15:26

You are welcome.

Post Reply