MySQL for Visual Studio 2015 - mysql

For the last 12 hours I've tried to make the MySQL Database appear in Visual Studio 2015. I've downloaded the installer and installed everything. Since that didn't make anything appear in the list of new database connections (Tools > Connect to Database), I started to google. Most of the posts are pre 2013 though. (I also tried 2013 but no luck there either).
I've tried to install EntityFramework, MySql.data, MySql.Data.Entity and so on from the NuGet Package Manager. I've edited the app.config and the packages.config as seen from other tutorials.
But most of what I've read was just "Install and it should work".
Though the MySQL Connector/NET doesn't appear in the list when pressing "About Microsoft Visual Studio". (Should it? I saw someone else have it).
It is 1 am so I'm pretty tired right now.
Does it matter if I have the MySQL installation on a other hard drive? I later reinstalled it on the same hard drive but no difference.

Not sure if you are still searching for a solution to this question given it was asked 6 months ago.
If you are download: MySQL Installer (v5.7.12 # 2016-05-18)
Run the installer and add "MySQL for Visual Studio". Sometimes you have to remove and re add the package for it to work. Add the Connector/Net (v6.9.8 # 2016-05-18) if it is not installed.
The result is:

Download the Zip MySql for Windows and extract
Open your Solution/Project in Visual Studio and open project properties
Select references -> Add -> Browse (Downloaded file directory)
Open the top foldder e.g. 14.0v14 and select MySql.data.dll and add
Go to Form1.vb or Similar and Imports MySql.Data.MySqlClient
Enjoy!!!

Related

MySQL workbench failing to download

I have a Mac and use parallels to access Windows 11. I am trying to download MySQL, and everything successfully downloaded except for the Workbench. It fails to install every time with the error, "The processor is not adequate for running MySQL Workbench 8.0 CE."
I have tried googling and searching through forums and videos, and cannot find this exact error, and have tried using solutions from similar workbench issues.
I have tried uninstalling the program, and reinstalling, as well as restarting Windows and the computer as a whole. I have downloaded Visual Code 2022, 2019, and 2017 in hopes that one of these would work, but none did. I also added the development C++ add on to Visual Code like some people suggested, and that did not help. I also have downloaded the 2017 Visual C++ Redistributable for Visual Studio 2017 (version 15.9) and tried to "repair" it. Still did not work, still get the same error. Also, I have already downloaded NET framework 4.5, so that is not the problem either.
I don't know where else to look, or what other resources to try and was wondering if anyone had any ideas or knows to how to solve this issue. Thank you for any help!
Windows on ARM emulation isn't good enough to trick the MySQL Workbench installer into thinking that it's running on an Intel CPU, so the installation fails.
Fortunately, this is fixable with some degree of effort - you have to patch the MSI file. There's likely other ways to do the patch, but here's how I did it using Orca:
Install the Visual Studio 2022 ARM preview and include the tools needed for C++ development. This will get the Windows SDK installed.
Run the Orca installer that's bundled with the Windows SDK (it will be put somewhere like "C:\Program Files (x86)\Windows Kits\10\bin\WINDOWS SDK VERSION\x86\Orca-x86_en-us.msi")
Download the MySQL Workbench .msi installer from https://dev.mysql.com/downloads/workbench/. Do not use the MySQL Installer that handles everything - you want the dedicated installer that handles just Workbench.
Right click the downloaded .msi, choose "Show More Options" and then "Edit with Orca"
Open the "LaunchCondition" table in the left hand list.
In the right hand side, there will be a row saying "Intel >= 5". Right click it and select "Drop Row" to remove the CPU check.
File > Save As and save your modified .MSI file.
You can now run the modified .MSI file and it'll install Workbench just fine on your Windows 11 on ARM environment. It works great in Parallels on my M2 MacBook Air!
your Mac silicon is M1?
M1 not support, intel is ok

Failed to open a connection to the database; MySQL.Data.MySQLClient; Cannot create a design window for the selected object

I am using
Visual studio 2017, version 15.9.11
MySQL for visual studio 1.2.9
MySQL-8.0.18-win64
mySQL-connector-net-8.0.18-noinstall
If I try to add a connection to a project via Data Sources > Database > Dataset, and set the connection with the right server name, user name, and password, and then select one table, select options and click Next I get the following error
"Failed to open a connection to the database Cannot obtain
provider factory for data provider named 'MySql.Data.MySQLClient'.Check the connection and try again."
Also, when I connect to a local MySQL database using Tools > Connect to database... and I create the connection, which successfully seems to be done in the server explorer, and then in the same server explorer panel, if I go Data Connections > localhost > tables > double-click on the table, this is the error I get:
Cannot create a design window for the selected object.
How can I solve this?
The problem
As I said in my question I had mysql-connector-net-8.0.18-noinstall extracted. I tend to extract binaries instead of installing things. Don't really have a good reason for this behavior.
After checking Vignesh solution and before uninstalling anything, I decided to give a try to the mysql-installer-community-8.0.18.0.msi installer, since I had the mysql-connector-net-8.0.18-noinstall extracted in one folder and then I added a reference in the project, which was not working. Perhaps there was a way to use this folder (binaries, global references, etc) properly, but I couldn't find one. Maybe I was the problem.
The solution
However, after installing via the msi file, everything is working now. So if you ran into this problem, having similar versions than the ones I'm using and had the no-install version extracted, you can safely close Visual Studio, and install the same version via the msi installer, this worked for me! Worst case scenario, you can uninstall it via the same msi file, and try Vignesh's or other's solution.
This error will be fixed by uninstalling Connector current version and installing Connector 6.9.8
Download Connector 6.9.8
Visual Studio 2015: Visual Studio 2015 Community + DotNet Connector 6.9.8 + MySQL for Visual Studio 2.0.3 is working combination.
Visual Studio 2017: Visual Studio 2017 Community + DotNet Connector 6.9.8 + MySQL for Visual Studio 1.2.7 is working.

WampServer - mysqld.exe can't start because MSVCR120.dll is missing

I've tried to run wampserver on my local side, but mysql server doesn't run.
when I try to install service, it give me error. I searched the answer all day and found some answers on here and there.
but any solution doesn't work for me. I tried to install warpserver on windows7 home OS vmware
Any help for me?
None of answers in google worked for me . This is how I solved my problem :
According to Wampserver forum you must install ALL versions of Microsoft Visual C/C++ Redistributable(2008 , 2010 , 2012 , 2013 , 2015 , 2017 ... ) . So you have to download them one by one and then install all of them (Not just one/latest ) .
I've already packed them here (x86) and here (x64). Just download and extract them then install all distributions at once then restart your Windows and run Wampserver.
Alternatively, you could download the full package from Microsoft's official page: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
That's it!
I finally found solution to fix my problem.
I've tried several ways to fix above problem and but nothing work for me.
As you know, WampServer use some visual c++ redistributable packs to run. And it makes user confuse which version of it should be installed (at least in my case)
After struggling few hours to fix it, I found good software - check_vcredist which guide wampserver installation easily.
http://wampserver.aviatechno.net/files/tools/check_vcredist.exe
Before you install WampServer, you'll get all information what you're missing on your laptop now if you run this software. Please follow it's notice. then WampServer will be installed successfully.
I hope this answer give some help to someone who is stealing his time to install WampServer.
Download visual c++ redistributable packs and install
Link: https://www.microsoft.com/en-in/download/details.aspx?id=30679
Restart and it should work
You should install the following packages:
Microsoft Visual C++ 2012 (11.0)
Microsoft Visual C++ 2013 (12.0)
Microsoft Visual C++ 2015-2019 (14.0)
👇Try this one, it works for me after facing bunch of attempts👇
Solution for Wamp server problem(msvcp120.dll or msvcp120.dll or any other missing file)
Install wamp server
if the problem encounters as msvcp120.dll or any other file missing
search for the particular file with correct system ( whether 32 or 64bit ) size, then download the particular missing file, the file size is about ( 0.5 - 0.95 MB )
then extract the file and paste it in (local disk=>windows=>search for name as system 32 or 64)and click it.
then it'll show the list of files, in that location, paste the extracted file within the particular system 32 or 64
then uninstall the wamp server)
After that must shut down your PC
then turn on PC
reinstall wamp server .
Atlast, no problem will exist and green icon will also be displayed👍
Solved just installing:
Visual Studio 2015, 2017 and 2019: x64 https://aka.ms/vs/16/release/vc_redist.x64.exe
Visual Studio 2013 (VC++ 12.0): https://aka.ms/highdpimfc2013x64enu
Visual Studio 2012 (VC++ 11.0): https://download.my.visualstudio.com/db/en_visual_cpp_redistributable_for_visual_studio_2012_update_4_x64_3161523.exe?t=4e421644-264c-4b19-b362-eab41d52c831&e=1607795665&h=5bc66a728d26f6912200e633437ad9a9&su=1
And then, wampserver3.2.3_x64.exe
step 1 :
download check_vcredist.exe and run it.
now you can see what you don't have.
step 2 :
download what you don't have from here and install them.
I resolved with logic, I saw that the problem was with mysqld (MYSQL oracle in 3306), then I looked for the mysql 5.7 requirementes in the official page, and was vcredist c++ 2013 and downloaded, installed and solved. Only uninstall and reinstall wamp. But vcredist c++ 2013 was the solution for me for wamp 3.2.3 version.
download the missing file from
https://www.dll-files.com/msvcp120.dll.html
Add the file to C:\Windows\System32

Visual Studio 2015 not installing Mysql.data in NuGet

UWP App not being able to work with MySql
I have made an app in UWP and instead of using SQLLite which seems to be the norm for Visual Studio 2015 I want to use MySql. I have already connected my Azure mysql database to Visual Studio via the 'Server Explorer'.
I'm using MySQL Workbench to update my tables within my connected database from Azure but I cannot actually write any code to access my tables as whenever I try to install MySql.data/.entity/etc in the NuGet Package Manager I get an error.
nuget error
I tried downloading the Mysql installer, the Mysql drivers for Ado and ODBC. I even tried downloading the MySql for Visual Studio option as I found out that Visual Studio is not compatibile with MySql and instead requires the MySql for Visual Studio download but I still have errors whenever I try to use MySql in my code as I need an assembly reference for it but I'm having no luck in being able to get one that doesn't error.
Does anybody have any idea how I could actually use MySql within Visual Studio 2015?
This is what I've been using as my guideline but I can't seem to get past the Mysql.data errors when installing.
http://web3.codeproject.com/Articles/1074242/Designig-your-Azure-MySQL-DB-with-a-UWP-Demo
I have seen a lot of people talk about this but there is no one straightforward fix (I've tried a lot of the fixes, one in particular being to use Vs13 to install Mysql in the Nuget package manager and then it should update within VS15 but as my app is a UWP VS13 does not actually load/read it so that idea isn't good to me, might help anyone else though)
Starting with 6.7, Connector/Net fully supports building Windows Store apps. But using Connector/Net RT is not by install the Nuget package, it just reference the MySql.Data.RT.dll assembly according to MySQL Connector/Net Developer Guide:
Using Connector/Net RT is easy. Simply create a Windows Store application using Visual Studio and then reference the MySql.Data.RT.dll assembly in your project. The code you write should be exactly the same as for normal Connector/Net (including using same namespace MySql.Data.MySqlClient) except for the differences listed above.
You may find this dll at C:\Program Files (x86)\MySQL\Connector.NET 6.79\Assemblies\RT if you have install the connector. You can also download the mysql-connector-net-6.7.9-noinstall.zip to find this file inside the folder. I also have a MySql UWP sample before and has the dll here. Right click your project and add reference for this it will work.
More details please reference this sample

Visual Studio Windows Installer with MYSQL check and Install

I have a VB Windows forms application that uses a mysql database to keep track of everything within the application.. The problem that I know will occur is that most of the applications users will not have MYSQL let alone know how to install it properly... To install the application on the users systems I am using the Visual Studio Setup Installer to handle creation of the msi files.. What needs to happen first is the installer needs to check to see if MYSQL is installed on the host system and verify server name.. If true then import database, if not then install followed by import database... The importing is not the issue here... How do I make the installer install mysql with controlled parameters such as server name, etc, etc. Any ideas on this??? I have hammered google for the past 3 hours looking for bread crumbs on this but to no avail...
Usually existing packages (like the MySQL installer) are added as prerequisites. Visual Studio setup projects do not support custom prerequisite creation. However, this can be done by manually generating the required manifests.
You can find the manifests structure here: http://msdn.microsoft.com/en-us/library/ms229223(VS.80).aspx
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\
You can then select the prerequisite in your setup project properties page.
Well... that's a good question. The first thing that pops up in my mind:
You could build the check in your application instead of the installer and warn the user about it. If needed, you could provide another installer to make sure everything is available (MySQL and the database itself).
I hope it helps you further.
Yours sincerely,
Roland