Solved

create MySQL database

Posted on 2006-07-07
4
229 Views
Last Modified: 2010-04-23
hi,
how do i create a MySQL database using code in vb 2005?
thanks
0
Comment
Question by:newyuppie
  • 2
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17064474
in short, run the command:
CREATE DATABASE <dbname>;
being connected to the MySQL server.

But I guess you problem is not that command?
0
 
LVL 13

Author Comment

by:newyuppie
ID: 17064738
not exactly angelIII,

i use a third party provider (MySQLDirect from CoreLabs) that provides native .net provider including tableadapters and all.

anyway, the problem is how do i connect to the MySQL server (using my provider if you know how, or maybe with ODBC one from mysql site) when (in the case of MySQLDirect) i need to pass as a parameter the name of the database to connect to and that database is yet to be created.

maybe this is a problem of my provider, i don't know if you need to always (using any other provider) pass the database name to connect to MySQL server, could you instruct me in that maybe?

thanks
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 17065884
usually, when connecting to mysql, without specifying a database, you get to the system database called "mysql". once connected, and assuming the user has the requested permissions, he can issue the create database statement, and then reconnect to that server specifying that database.

0
 
LVL 13

Author Comment

by:newyuppie
ID: 17070521
angel, that works actually. i have connected the user to the mysql database and issued a create database statement, i didnt know you could create dbs from within another db.

thanks

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question