MariaDB is an open-source relational database management system (RDBMS) that has gained popularity due to its robust performance, reliability, and compatibility with MySQL. Whether you’re using MariaDB for development, data storage, or analytics, one of the challenges developers face is accessing the database from outside their local network. This article will guide you on using Pinggy to overcome access challenges caused by NAT, CGNAT, and firewalls.
docker run --name mariadb-test -e MYSQL_ROOT_PASSWORD=yourpassword -p 3306:3306 -d mariadb
3306
:
ssh -p 443 -R0:localhost:3306 tcp@a.pinggy.io
tcp://example.pinggy.io:48780
.mariadb
command, or DBeaver.MariaDB is a fork of MySQL that offers advanced features and better licensing terms. Built with speed and scalability in mind, it supports standard SQL and is compatible with a wide range of tools and applications. It is commonly used in web applications, enterprise-grade systems, and cloud-based platforms.
When working with MariaDB locally, you might encounter issues when trying to access it from external devices or applications. These challenges often stem from:
These barriers make it challenging to access your local MariaDB instance for testing, debugging, or remote collaboration. This is where Pinggy comes in handy.
Pinggy is a lightweight tunneling solution that creates a public endpoint for local services. It allows you to expose your local MariaDB database to the internet securely and easily, bypassing NAT, CGNAT, and firewall restrictions.
Here’s a step-by-step guide to accessing MariaDB using Pinggy.
Note: Using Docker to run MariaDB here is just an example. You can follow similar steps if your MariaDB instance is installed natively or hosted elsewhere.
If you don’t already have a MariaDB instance, you can use Docker to set up one for testing:
docker run --name mariadb-test -e MYSQL_ROOT_PASSWORD=yourpassword -p 3306:3306 -d mariadb
MYSQL_ROOT_PASSWORD
: Replace yourpassword
with a secure password for the MariaDB root user.-p 3306:3306
: Maps MariaDB’s default port (3306) to your local machine for access.To ensure the MariaDB instance is running, check the logs:
docker logs mariadb-test
If you are using a native or pre-existing installation of MariaDB, make sure it is accessible locally on port 3306.
Create a Pinggy TCP tunnel to expose your local MariaDB instance securely. Run the following command:
localhost:3306
on your machine.tcp://example.pinggy.io:XXXXX
.You can now connect to MariaDB remotely using the public endpoint provided by Pinggy:
MariaDB Command-Line Client:
mysql -h example.pinggy.io -P XXXXX -u root -p
Replace example.pinggy.io
and XXXXX
with the hostname and port provided by Pinggy. Enter the MariaDB root password when prompted.
Using DBeaver:
Note: You can also inspect the incoming requests in the Pinggy URL Terminal.
Accessing MariaDB remotely can be challenging due to NAT, CGNAT, and firewall restrictions. However, Pinggy provides a quick and secure solution to expose your local MariaDB instance to the internet. Whether you use Docker or a native installation of MariaDB, Pinggy ensures a seamless experience with minimal configuration.
Start using Pinggy today and make remote access to your MariaDB instance hassle-free!