Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Trying to get an OLEDB provider to connect to MySQL Database

  Asked By: Madeline    Date: Mar 01    Category: MS Office    Views: 2255
  

I would be grateful if this could be solved.

I am using the MySQL 6.0 database Server. I managed to connect to the
database using the ODBC provider and using ADO as the API to manipulate
the database.

I wanted to do the connection using the OLEDB provider for MySQL.
The OLEDB provider for MySQL is not available on their website. I
managed to get the driver anyway.

My connection string was

Provider=MySQLProv;Server=localhost;Port=3306;User=root;Password=pl;Data
base=NIFTY

Is it possible?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Fabiola Ferrrari     Answered On: Mar 01

You should be able to make the connection; you just need to get the right
combination of keywords and values in your connection  string. On
connectionstrings.com/?carrier=mysql, a simple sample it provides is:



Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;



The Port keyword is optional, since you're using the default port. Possibly
you can only use "User Id", and not "User" as you did. And apparently you
should use "Data Source" instead of "Database". So in your case I would try:



Provider=MySQLProv;Data Source=NIFTY;User Id=root;Password=pl;



In my experience, your selection of either the use of "Provider" or "Driver"
or neither determines which other set of keywords you should use, and I
think your mixing and matching, which might be part of the issue.

I haven't tested an OLE DB mysql  connection just now, but have in the past
without difficulty.

 
Answer #2    Answered By: Edith Mcdonald     Answered On: Mar 01

I think the Data Source value should be equal to localhost isn't it?

The setting for the table "Initial Catalog = myDB"

But still these settings don't work.

managed  to connect  using the ODBC drivers smoothly, experimentd a lot with
OleDB but could not find anythign off the net for MySQL.

The pursuit for the OLEDB drivers is just for academic purposes. But I would
really like to know how to go about doing it.

 




Tagged: