MySQL Connector/ODBC with current MySQL database

phpmyadmin
mysql

#1

Hi C9 community, I need some help regarding establishing an ODBC connection between my Windows Computer using the MySQL ODBC Connector and the current database I am running. I have a running MySQL database working with my app, and I now need to create an ODBC connection to connect said database to another database software on my computer. However, I am having issues establishing a connection when entering the TCP/IP Server field.

I have tried running curl ipinfo(dot)io in the terminal and using the ip address given, as well as the general site root path (xxx.remyc95.c9users.io) but cannot establish a connection with my current user I have created and am able to work with in phpmyadmin.

What should I be looking for when entering the TCP/IP Server field? Do C9 databases support ODBC connections to its databases?

Edit: Error produced is “Lost connection to MySQL server at 'reading initial communication packet, system error: 0”

Thanks in advance.


#2

You can use localhost instead of IP addresses or hostnames when connecting to software running on your workspace, so long as you have configured your software (e.g. MySQL server) to listen on localhost. We only expose ports 8080, 8081 and 8082 to the internet for hosted containers, and then they can only accept HTTP and WebSockets traffic.

Please see our documentation on ports for more information about exposing your applications to the internet.