Forums

Using Tableau with my app

I am looking for a reports builder to use with my app. Would I be able to integrate Tableau (http://www.tableau.com) with my MYSQL database? Would I be able to call the reports inside my app? Thanks!

I don't know. It depends how tableau expects you to feed it data?

This is what I found. Tableau connects to MYSQL through SSL or ODBC driver.

http://kb.tableau.com/articles/knowledgebase/preparing-mysql-connection-using-ssl?keywords=mysql

Looks like it could work. You'd need to use SSH to tunnel to the MySQL server. There's a help page for that.

hi Glenn, The help page is for Windows. Do you have any recommendations for connecting from a Macbook?

Thanks!

I had one more question. What is the host name of my MYSQL server? Is the username and password the same I use to log in to MYSQL?

Here's the guide to SSH tunnelling on our wiki: https://www.pythonanywhere.com/wiki/SSHTunnelling

Thanks. I am getting this error.

16:18 ~$ ssh -L 3306:mysql.server:3306 amritha@ssh:pythonanywhere.com ssh: Could not resolve hostname ssh:pythonanywhere.com: Name or service not known

you've made a mistake in your copy+paste.

Thanks _ I have connected to ssh.

I get the following errors when I try to connect to Tableau.

server amritha@pythonanywhere.com (also tried with ssh)

host 3306

username - tried both amritha and amrithany@gmail.com

password - tried both pythonanywhere password / mysql password

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 connect to MySQL server on 'amritha@pythonanywhere.com' (60)

Unable to connect to the server "amritha@pythonanywhere.com". 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.

Thanks!

Do you get a different error message if you use the server ssh.pythonanywhere.com, the username amritha, and your PythonAnywhere password? Those are the correct settings.

No it's the same error message.

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 connect to MySQL server on 'amritha@ssh.pythonanywhere.com' (60)

Unable to connect to the server "amritha@ssh.pythonanywhere.com". 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.

It looks like you have amritha@ssh.pythonanywhere.com as the server name rather than just ssh.pythonanywhere.com...?

Yes you are right - I removed it but still getting the same error.

Can I please check with you whether what I did on pythonanywhere bash console is correct?

ssh -L 3306:mysql.server:3306 amritha@ssh.pythonanywhere.com

mysql -u amritha -h mysql.server -p

use amritha$costtool;

Is there anything else I have to do? Thanks!

Aha! Did you run the ssh command on PythonAnywhere? That may be the problem. Try running that command in a terminal on your Mac. When it asks you for login details, use your normal PythonAnywhere connection details (ie. the ones you use to log in to the website).

Once you've done that, use the server name "127.0.0.1" in Tableau. For the username, use amritha and for the password use your MySQL password.

Yippee - it works now.

Thanks a lot - you have been incredibly helpful.

No problem! I've updated the help page to make it clearer that the ssh command should be run on your local machine.

Hello, I was trying to connect tableau to the mysql database. I decided I would tunnel it through windows. I regularly connect through python without problems but anytime I try and setup a windows 10 ssh tunnel I get the error "no kex alg" meaning that there was an error in the key exchange. anybody has any suggestions on how to avoid this?

Which tool are you using to set up the SSH tunnel?