MySQL Database Tunneling
This guide provides a step-by-step approach to securely expose your local MySQL database.
Create a MySQL TCP Service
MySQL's default port is 3306. If you have changed this, please update accordingly.
Open the Panda Tunnel software and input your MySQL address and port. Since MySQL uses the TCP protocol, enter tcp://127.0.0.1:3306
.
Once successfully created, you will receive a Public Link. Copy this link to prepare for connecting to the TCP service.
Connect to the MySQL TCP Service
When connecting to non-HTTP services from another computer, you need to download the Panda Tunnel client.
With your Public Link, you can connect to your database from any computer.
Open Panda Tunnel, switch to the Connect Service tab, and enter the service domain, such as 5826054.tunnel1.win
.
After connecting to your service, you will receive a Local connect link. Use this address to connect to your service.
Connect to Your Database
After completing the previous steps, your service is successfully connected. Now, use the Local connect link (e.g., 127.0.0.1:39884
or 192.168.0.234:39884
) to test the database connectivity.
-
Test database connectivity via command line:
mysql -uroot -P 39884 -p
After entering your password, if you see the following message, the connection is successful.
-
Use Navicat to verify database connectivity: