• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

VB 6 and mySQL

disavowed00

OSNN One Post Wonder
#1
I want to connect a mySQL database to a VB program. mySQL is running on my host machine. The problem is that I'm nt sure what to use for the server name in the connection string. I am very new at this (2 days) so I need a little help. I tried using myodbc but it just gives me an error.
Things I need to know:
1) What do I use for the server name in the connection string
2) I did not set up a password for mySQL so what do I use for the user name

3) If there is an easier way to do this then please tell me.

Also, I am using ado controls
 
#2
1. Server name is the name of the host machine mysql is installed on (computer name).

2. You need to set a username & password using the mysql admin tool to gain access/set privliges to your database.

3. This is the simplest way I can think of!
 
#3
as long as mysql is on your localhost machine then you can refer to it as "localhost" if you run mysql.exe (assuming you are on windows) then you need to create a database, switch to it and then create the tables you need
you will also need to add some users to it. I think there are probably some windows gui applications that you can use to set things like that up.
 

disavowed00

OSNN One Post Wonder
#4
I have set priveleges and access. VB still can't find the server on my local machine. I have tried using localhost as the server name and the computer name itself. Niether works!

Thanks for the help so far, but it still doesn't work.
 

fitz

Woah.. I'm still here?
Staff member
Political User
#5

Members online

No members online now.

Latest posts

Latest profile posts

Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,015
Latest member
evaiwhitis