Home WebServer PanelaaPanel How to enable MySQL on aaPanel remotely

How to enable MySQL on aaPanel remotely

by Thạch Phạm
Published: Last Updated on

In today’s article, AZDIGI will guide you on how to enable the SQL feature on aaPanel remotely.

I. Overview

In many cases, you will need to connect SQL on aaPanel remotely instead of using the phpMyAdmin interface right in the browser. This feature is extremely useful, especially for developers specializing in designing websites, applications… will need a remote SQL connection because of its stability and handy for editing databases, just like you usually use to edit the source code via FTP.

II. How to enable remote SQL on aaPanel

To enable remote SQL on aaPanel, we perform the following 3 steps:

Step 1: Access the aaPanel admin page

To access the aaPanel admin interface, we access the link http://IP:8888 on the browser.

Below is my aaPanel interface:

Screen Shot 2020 11 08 at 10.40.11 AM
The management interface of aaPanel.

After accessing the aaPanel admin page, we continue to step 2 to enable remote SQL for any database.

Step 2: Enable remote SQL for a database on aaPanel

At this step, we access the database list at the Databases feature on the left toolbar.

image 30

As in the image below, I have 2 databases and I will enable remote SQL for the database named iphime, please select the Permission button at that line.

image 31

Then the screen will show 3 options:

  • Option 1: Local server – Only allow connections from the aaPanel server.
  • Option 2: Everyone – Allow remote connections from all IPs.
  • Option 3: Specified IP – Only allow from certain IP addresses, each separated by a comma (,).

Because my devs ask me to turn on this feature, they often work remotely, and their network’s IP address will change constantly. And I need to select the Everyone option so she can always connect.

Then we click Submit to confirm the Permission change. If you want the remote SQL connection between your devs to your server to be encrypted, please enable the SSL option as well, but this will reduce performance because of the encryption and decryption between the two ends.


After enabling remote SQL on aaPanel, let’s try remote to the database just enabled.

I will use Sequel Pro software to connect.

  • Host: fill in the aaPanel server IP information.
  • Username: enter the username of the database, by default aaPanel Database and Username, will be the same.
  • Password: The password of your Username. If you don’t remember, you can choose the eye icon or the copy button next to the password.
  • Database: I leave it as Username.
  • Port: If your MySQL uses another Port, you can fill in that port, and if you leave it blank by default, Sequel Pro will understand it as 3306.
  • Connect using SSL: Remember to tick this box if you enabled Force SSL in the previous paragraph.
The interface uses Sequel Pro to connect to remote SQL.

After clicking Connect, I got an error that I could not connect to the host, If you can connect, you can skip step 3. Since we can’t connect, we need step 3, which is to open port 3306

image 34
The connection failed because port 3306 is not open.

Step 3: Open MySQL port 3306 on aaPanel

If you can’t connect as in step 2, it’s because aaPanel’s firewall has not opened port 3306. So to be able to open this port we access the Security feature in the left sidebar.

image 35

Next, fill in the information as shown below and select Open.

The port box we fill in is 3306, the description you can change depending on your needs.

Please wait a moment you will see that Port 3306 has been added.

Port 3306 has been added to the list of ports that are allowed to connect from outside.

Then we can try to connect again with Sequel Pro. And the result is that I have successfully connected.

The remote SQL connection is successful.

So we have completed the steps to enable the remote SQL feature on aaPanel.

III. Summary

So through this article, AZDIGI has shown you how to enable the remote SQL feature on aaPanel. If you have done all the steps but still cannot connect, please contact your VPS provider to check if it is being blocked outside your management.

Hope this article will be of help to you. Wishing you success!

See more useful articles about aaPanel at the following link:

If you need assistance, you can contact support in the ways below:

  • Hotline 247: 028 888 24768 (Ext 0)
  • Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com
  • Refer to AZDIGI’s Hosting/VPS service here!

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign