0

I recently set up the most basic possible version of MySQL 5.6 and created a test schema in which a test table was placed. The connection is just named "Local instance MySQL" with host "localhost", port "3306" and server "MySQL Community Server (GPL).

I let SQL decide the user login name 'root'. I'm now trying to connect this test database to Excel using the data import 'From Other Sources' option.

When I try to establish a connection to server name "MySQL Community Server (GPL)" I receive the error "[DBNETLIB][ConnectionOpen (Connect().]SQL Server does not exist or access denied."

I've looked around and it turns out this is a very common and very generic error. So far I've made sure that the server is running that I can access it via MySQL workbench, and I've checked firewall settings. I was wondering if anyone has had the same problem occur after having just set up a basic test database for MySQL. I'm hoping that the fact that the associated database is just a locally hosted one table database without any bells or whistles will make it easier to diagnose the problem.

7
  • "I've tried a few of the solutions without much luck." Since we're not mind readers, what exactly have you tried already, and what were the results. Have you confirmed the MySQL server services are actually running? Can you successfully connect to it using something like MySQL Workbench? Commented Dec 23, 2014 at 19:38
  • @'TECHIE007 Sorry, I've updated to be more clear. I suppose I haven't actually tried that much but many of the other solutions involve resetting I've never modified or handling components that this simple single table database doesn't have.
    – 114
    Commented Dec 23, 2014 at 19:45
  • No problems. So you CAN access it via MySQL Workbench? Commented Dec 23, 2014 at 19:52
  • @'TECHIE007 Sorry, yes, all I have done so far with the database is create it in MySQL Workbench and run it locally.
    – 114
    Commented Dec 23, 2014 at 19:55
  • So, let me get this straight, you're picking "From Other Sources" then "From SQL Server", and then typing "MySQL Community Server (GPL)" as the "Server Name" on that dialog screen, correct? Commented Dec 23, 2014 at 19:59

1 Answer 1

1

The SQL data connector in Excel is for connecting to Microsoft's SQL server. To connect to MySQL you'll need to install a specific connector for MySQL.

You can get a MySQL ODBC connector from Oracle here.

ODBC Driver for MySQL (Connector/ODBC)

Also, Oracle makes a utility called MySQL for Excel which should get you everything you need to hook up Excel to MySQL to pull data.

MySQL for Excel is an Excel Add-In that is installed and accessed from within the MS Excel’s Data tab offering a wizard-like interface arranged in an elegant yet simple way to help users browse MySQL Schemas, Tables, Views and Procedures and perform data operations against them using MS Excel as the vehicle to drive the data in and out MySQL Databases.

8
  • @'TECHIE007 That would be great, but it seems that it requires "Visual Studio Tools for Office 2010" which requires Visual Studio. Unfortunately I don't have Visual Studio. Is there another, worse way to add a connector for MySQL?
    – 114
    Commented Dec 23, 2014 at 20:25
  • What makes you think that requires VS to use? Commented Dec 23, 2014 at 20:28
  • @'TECHIE007 It says so in the installer, after trying to install it nothing happened and it states "Visual Studio Tools for Office 2010 is not installed", which it states is a requirement.
    – 114
    Commented Dec 23, 2014 at 20:30
  • Well isn't that silly. :) I never noticed because I have VS installed. OK, I added a link to answer that points to an ODBC connector download. ODBC connectors can be kind of sucky to distribute, but for your usage it will hopefully suffice. :) Commented Dec 23, 2014 at 20:31
  • 1
    Ensure you're using the actual hostname of the computer (or "localhost", or the IP address) and not "MySQL Community Server (GPL)", as that name means nothing to the network. :) If you have a specific question about the setup of the ODBC connection, perhaps start a new question including what you've tried already and what the results were. Commented Dec 23, 2014 at 20:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .