WD-40
WD-40

Reputation: 369

Requesting help troubleshooting PowerShell/MySQL connectivity

I'm having trouble getting PowerShell to talk to MySQL. The frustrating part is that it had been working then suddenly stopped. I have searched around and unfortunately much of what I find is "Do these steps and it works" but there is something apparently getting in the way in my environment.

Here is information about what I'm running into: * Windows 7
* PowerShell 2
* WAMP running MySQL 5 (MySQL is running and I can run queries with phpMyAdmin)
* Scripts that I used to be able to run now error out with "Cannot find type [MySql.Data.MySqlClient.MySqlConnection]"
* I was using SQLPSX (http://sqlpsx.codeplex.com/) to connect before and I've reinstalled that
* I have rebooted multiple times to try to clear things out
* I am running scripts as administrator
* I downloaded Connector/Net 6.3.6 again and reinstalled

I have no idea what happened to make this stop working. I have searched to try to get this resolved with no luck and I don't know what else to search for. If anyone has any ideas on what I can do or diagnostics I can run to troubleshoot the situation I would appreciate hearing them. Thanks.

UPDATE Perplexingly enough I rebooted again today and PowerShell is now talking to MySQL again. :/ I'm still interested in hearing if anyone has any diagnostics that can be run to help pinpoint where the communication failure is happening.

Upvotes: 0

Views: 281

Answers (2)

Jeremy
Jeremy

Reputation: 243

I would say take a look in the Event Viewer and see if there are any errors starting near the time when you encountered the issue. Typically, if there is anything, they will give a decent clue as to what the issue is.

Take a look at patches to see what was installed and when. Its not uncommon for a patch to break something. Take a look in Add/Remove Programs at the installation dates and see if anything lines up.

You might try removing and then re-installing your entire WAMP stack.

Upvotes: 0

Mike Shepard
Mike Shepard

Reputation: 18146

sounds like you're missing the ado.net drivers for MySQL. Don't know why you'd be missing them if it was working before, but that's what the error sounds like.

Have you tried re-installing them?

Upvotes: 0

Related Questions