简体   繁体   中英

Visual Studio 2013 connection to local MySQL Database

Getting right to the point, I'm learning Visual Basic, and I want to connect Visual Studio 2013 Express to a local MySQL database that I have running on the default 3306 port. For now I would be ecstatic just to have it show up in the explorer for me to play around and see what one can do with it.

The Current State of Things:

So, I went opened up the "Data Sources" sidebar and tried to set up a connection to the database:

在此处输入图片说明

The credentials and db name at the bottom are both correct, by the way. Yet, "Test Connection" laughs in my face with this generic, unhelpful error:

在此处输入图片说明

So I do some Googling to figure out where I messed up my server's my.ini file. These are the only edits I've made from the default config:

  • bind-address: 127.0.0.1
  • skip-networking: true
  • enable-named-pipe: true
  • port: 3306
  • socket: /tmp/mysql.sock
  • skip-grant-tables

All in attempt to remove as many possible connection hindrances as I can, to the best of my knowledge. I made sure the server is running, restarted the service after every config change, and I can access the database from MySQL Workbench just fine. I'm at a loss :( so if you have an idea, lets hear it! :)

If I left out anything useful, or if you need more info, I'll get it for you!

actually I just may have found the solution! As I'm having the same problem; cannot connect to MySQL using an Express version of Visual Basic: the problem it self seems to be with MS licensing.

However I came across an announcement of Oracle MySQL saying with the new release of Visual Studio Community it would be possible to use MySQL to connect to a database. I just finished my installation of Visual Studio Community 2013 and successfully created a connection a local database using MySQL.

You can download Visual Studio Community Here:

Additionally you'd have to download and install MySQL for Visual Studio, download link here:

Seems there is no need to install a MySQL Connector.

I've seen multiple threads with this same question. Hopefully solved now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM