For those who get this error running Powershell 2.0 and using .NET 4, the procedure is slightly different. You will still need the .NET connector.
You will need to create a configuration file in the $pshome directory to enable Powershell to work with .NET assemblies 4. This answer provides an appropriate solution for this, and the comments contain some useful information for 64-bit machines.
If you are having problems with LoadWithPartialName ... it turns out that it is deprecated from Powershell 3.0 . This alternative will work in both 2 and 3, and it may be a little easier to fix the problem, since this is a cmdlet:
Add-Type -Path '$path\MySql.Data.dll'
Where $ path is the directory where MySql.Data.dll is located.
source share