Connecting to MySQL

Support for all customers who have purchased a PrimalSQL product license. This forum does not offer a response time guarantee.
Forum rules
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 28
Joined: Thu Apr 30, 2009 4:49 am

Connecting to MySQL

Post by bhagerty » Thu Apr 30, 2009 4:49 am

Can some one provide a guide/how-to for connecting to a MySQL database?

User avatar
Ferdinand Rios
Posts: 372
Joined: Tue Nov 14, 2006 2:56 am

Connecting to MySQL

Post by Ferdinand Rios » Thu Apr 30, 2009 4:55 am

You will need to install a MySQL OLEDB connector. You should be able to find that on the MySQL web site.

Once that is installed, create a new connection.

Select the MySQL OleDB connector. Give it the Data Source, user name, password and create the connection.
F.G. Rios

User avatar
Posts: 47
Joined: Fri Aug 24, 2007 11:11 pm

Connecting to MySQL

Post by mwilson3 » Wed May 06, 2009 4:51 am

Okay, so I installed the OLE DB connector & everything is working great in PrimalSQL now.HOWEVER, when I click on Generate Script --> Powershell Script File, and run the resulting script file, I get the following error in PoSh:Exception setting "ConnectionString": "The .Net Framework Data Provider for OLEDB (System.Data.OleDb) does not supportthe Microsoft OLE DB Provider for ODBC Drivers (MSDASQL). Use the .Net Framework Data Provider for ODBC (System.Data.Odbc)."At line:1 char:15+ $DBConnection.C <<<< onnectionString = 'Provider=MSDASQL.1;Persist Security Info=False;Data Source=TETON-ATC'So.... it looks like PoSh requires that I use the .NET Connector instead of OLE.Thoughts? I am about to try to manually replace those connection lines with the relevant .NET versions and cross my fingers, but am I going to have to do this each time I want to generate a script?Thanks,Matt

User avatar
Posts: 1789
Joined: Sun Jan 21, 2007 11:31 pm

Connecting to MySQL

Post by jhicks » Wed May 06, 2009 10:35 pm

The dev team will have to look into this deeper, but in the mean time you should be able to modify your generated script, if you haven't already. You probably have a line like this:$DBConnection = New-Object System.Data.OleDb.OledbConnectionchange it to:$DBConnection = New-Object System.Data.ODBC.ODBCConnectionAlso change:$Cmd = New-Object System.Data.OleDb.OleDbCommandto:$Cmd = New-Object System.Data.ODBC.ODBCCommand