Couldn't use the MySql.Data.MySqlClient due to version - mysql

I am using VS2013.5, I installed the MySql for visual studio that is in the MySql Site. When I compiled my project, this warning appeared which, in the process, disabled me to use the MySqlClient methods and functions:
Warning 1 The primary reference "MySql.Data, Version=8.0.12.0,
Culture=neutral, PublicKeyToken=c5687fc88969c44d,
processorArchitecture=MSIL" could not be resolved because it was built
against the ".NETFramework,Version=v4.5.2" framework. This is a higher
version than the currently targeted framework
".NETFramework,Version=v4.5".
how can I resolve this? Is there a way to download and install the older mysql version?

You have to use and install an older MySQL connector or a newer .NET version. That is a common problem. Try to install the Version 6.X. Then it could work. If you have downloaded the MySQL integration for the Visual-Studio you have to install an older version. Not all versions are compatible and some new version have bugs and you can't open some windows. I had the same problem.
So you have to try some versions and combinations to find the correct one.

Well, if you are using .NET Framework v4.5 or v4.5.2, you better use MySQL Connector version 6.9.8. It'll work, mine did.
.NET Framework v4.5.2 work against MySql.Data, Version=8.0.12.0. So you have to use lower version of connector that is compatible with your .NET
Uninstall current connector (8.0.12.0), then from your Project > Reference tab, remove MySql.Data that has a version of 8.0.12.0. Install 6.9.8, then from Reference > Add > Search and CHECK MySql.data 6.9.8.

Related

How to use mysql connector NET in intelliJ (mac)

I'm a macOS user and my editor is intelli j.
And I want to install Mysql connector "NET" but, I can't even install...
How can I use Mysql connector NET in intelli j???
(or should I use it in only VS code??)
The MySQL Connector/NET is for Microsoft C#/.NET, not for Java, so you cannot install MySQL Connector/NET and use it from IntelliJ. You need to use MySQL Connector/J, and you don't 'install' it. If you want to use it from within IntelliJ itself, you don't need to install anything, IntelliJ has it included (or will download it when needed).
If you want to use it from a program you write in IntelliJ, you will need to add a dependency to your pom.xml (Maven), or build.gradle (Gradle), or manually add a library to your project (if you're not using a build tool), see How to add external library in IntelliJ IDEA?.

How to fix dart 2 mysql not working and sqlkocky package?

I want to connect mysql database using dart sqljocky package but it's not compatible. dart analysis show error.
Resolving dependencies...
The current Dart SDK version is 2.0.0.
Because dartAuth depends on sqljocky >=0.1.3 which requires SDK version <2.0.0, version solving failed.
Because dartAuth depends on sqljocky >=0.1.3 which requires SDK version <2.0.0, version solving failed.
According to the error, the installed version of the Dart SDK is too new for the sqljocky version required by dartAuth.
You'll either need to downgrade to a pre-2.0.0 version of the Dart SDK or upgrade to a dartAuth version that doesn't require an outdated version of sqljocky (which hasn't been updated in three years).
It's not clear from your post, but it looks to me like you must be using a very old version of dartAuth if it's depending on sqljocky, so moving to a newer version of the former and replacing the latter with something that's actively maintained seem to be reasonable first steps.

using MySql.Data; not working with .NET Framework 4.6

I load the reference MySql.Data and verify that this is loaded.
I place
using MySql.Data;
into my code, but it cannot find MySql.Data.
There are many versions of MySql.Data available and many solutions indicated for this in previous posts.
One possible cause is that the .NET Framework version is incompatible with the version of the MySql Connector/NET.
Check your version of the .NET Framework, since the Connector/NET only works up to .NET Framework 4.5.x and changing the version from 4.6 to 4.5.2 worked for me. (Project > Properties > Application > Target Framework).
REFERENCE: MySQL Versions

MySQL workbench not installing

I am trying to install MYSQL Workbench but shows the error that says
Mysql workbench require the .net framework 4.5.2 to be installed.
But then when I download .net framework in my windows 8.1 it says
Microsoft .net framework is already a part of your system. You don't need to install the .net framework 4.5 redistributable.
So now please help me.
There are several ways to fix the issue:
1) Go to: https://dev.mysql.com/downloads/file/?id=480542
and update the MySQL INTALLER
to add Workbench 8.0
if that doesn't work
2) go to: https://dev.mysql.com/doc/refman/8.0/en/source-configuration-options.html
and look at possible resources to fix the issue,
3) Go to : Visual Studio and Modify by selecting
Desktop development C++
this will allow you to update the required software.
if all of these methods fail completely uninstall Visual Studio and MySQL and continue to restart computer.
Reinstall: https://dev.mysql.com/downloads/file/?id=480542
good luck.
This issue MySQL workbench caused because of .Net Framework 3.5 on Windows 8. Please install .Net Framework 3.5 on Windows first and then try MySQL workbench or follow these references
Follow Reference 1 or Reference 2

Connector/net does not support server versions prior to 5.0 after downgrading connector/net and mysql server version

Hi I believe there have been some similar topics regarding connector/ net not supporting server versions prior to 5.0.
I have been trying add in a connection to a database in visual studio 2013 and I am not able to connect due to the server version being 4.1.2 I am unable to upgrade this databases server as its out of my hands.
What I have done is follow the suggested answers which is downgrade the connector/ net prior to 5.0 and downgrade the mysql server to 4.1.
I have added in the reference and its still giving me the same error.
Can anyone suggest anything else I could try or may be missing?
Cheers guys I'm pretty desperate now!!
See MySQL Connector/Net Developer Guide - Connector/Net Versions. This document contains table that shows the .NET Framework version required, and the MySQL Server version supported by Connector/Net.
For MySQL Server 4.1 you may need to install Connector/NET v. 6.2 and .NET Framework 2.x
what you must do is, install a lower NuGet that supports the version you have of maria db, in my case, I install the MySql.Data.EntityFramework 8.0.11 and it will work without problem.