Connecting to MySQL
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
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.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
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.
- Ferdinand Rios
- Posts: 373
- Last visit: Fri Sep 16, 2022 1:24 pm
Connecting to MySQL
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.
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
Connecting to MySQL
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
Connecting to MySQL
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