0
votes

I am unable to connect to my MySQL server using Tableau from a different computer on the same network. I have WAMP installed on the server, I can access phpMyAdmin just fine and manage the database through there, but I need to access it from Tableau.

These are the errors I get:

Unable to connect to the ODBC Data Source. Check that the necessary drivers are installed and that the connection properties are valid. [MySQL][ODBC 5.3(w) Driver]Can't get hostname for your address

Unable to connect to the server "nick-server". Check that the server is running and that you have access privileges to the requested database.

Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.

Tableau Information

Any suggestions on what could be causing this?

2
Is the MySQL user account nick allowed to connect from the ip you are trying to connect from?RiggsFolly
Yes, nick can connect from anywhere.Nick Suwyn
Are you able to ping "nick-server" from your Tableau Desktop machine?Talvalin
I am able to ping the server; it seems to be something with the ODBC connection to the MySQL database. @TalvalinNick Suwyn

2 Answers

1
votes

1) There could be a firewall on your machine, allowing you to connect to port 80 for phpMyAdmin but not other ports.

2) If you can ping the second machine (ie resolve the name of the machine to an IP address and get a response), you can try to telnet into your MySQL port (3306) with telnet server 3306.

$ ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.054 ms

3) Here's an example response from a MySQL server via telnet. You will likely get something similar if you're able to reach your MySQL server.

$ telnet localhost 3306
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
J

If the steps above work, you should be able to connect from Tableau.

0
votes

Not sure if this is relevant to your problem, but I just ran into a similar issue and want to share my solution. Here was my input in Tableau:

Server: http://my.server.com
Port: 3306
Username: username
Password: password

I got the following error:

Unable to connect to the ODBC Data Source. Check that the necessary drivers are installed and that the connection properties are valid. [MySQL][ODBC 5.3(w) Driver]Unknown MySQL server host 'http://my.server.com' (0) Unable to connect to the server "http://my.server.com". Check that the server is running and that you have access privileges to the requested database.

I tried reinstalling the MySQL driver, restarting my computer, etc. but still got this error. I followed the advice in Ryan's post to use ping and telnet to ensure my machine could connect to the server, which it could.

My issue was that I included http:// in the server name, which caused Tableau to be unable to resolve the host. After changing the server name to my.server.com I was able to connect Tableau to MySQL with the following info:

Server: my.server.com
Port: 3306
Username: username
Password: password