InMotion Hosting Support Center

The WHM Security Advisor scans for possible changes to harden your VPS security. Below we cover how to clear the following error for VPS users not using remote MySQL:

The MySQL service is configured to listen on all interfaces: (bind-address=*)
Configure bind-address= in /etc/my.cnf, or close port 3306 in server's firewall

Security Advisor Scan

  1. To check for the MySQL service warning, first Login WHM as root.
  2. Select Security Advisor from the menu to start the scan.
    Screenshot in WHM selecting Security Advisor
  3. Check for the MySQL service alert.
    MySQL port open Security Advisor alert

If the alert above does display, you can fix this using one, or both, of the following methods:

Note: This may prevent your VPS from using remote MySQL.

Edit Config File

  1. SSH into your server as root.
  2. Edit the /etc/my.cnf file and add bind-address= to the file. To do so using nano editor:
    1. Type nano /etc/my.cnf and press Enter ⤶ to open the file.
    2. Scroll to the bottom of the file using the Down arrow and add
    3. Press Control and x for the save prompt before exiting.
    4. Press y, then Enter ⤶ to save the file.
      Screenshot adding code to my.cnf
  3. Afterwards, rescan with cPanel Security Advisor to ensure the error doesn't recur.

Close Port 3306 using CSF

Another option is to close port 3306 using your firewall. Advanced Policy Firewall (APF) users can remove the port from the APF configuration file using SSH as root. ConfigServer & Firewall (CSF) users can do this within WHM as root using the steps below.

  1. Select ConfigServer Security & Firewall from the WHM menu.
  2. Under csf - ConfigServer Firewall select Firewall Configuration.
    CSF selecting Firewall Configuration
  3. Under IPv4 Port Settings and Allow incoming TCP ports, remove "3306" from the text field.
    Removing port 3306
  4. Select Change at the bottom, then Restart csf+lfd.
    Restarting CSF and LFD
  5. Afterwards, rescan with cPanel Security Advisor to ensure the error doesn't recur.

Congratulations. You've further enhanced your VPS security. APF users can upgrade to CSF using our installation guide or via verified email request.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

n/a Points
2019-01-12 9:30 pm

Thank you for the excellent explanation. Worked great.

3,820 Points
2019-01-14 11:34 am
You're welcome, we are always happy to help! Also, we appreciate your feedback.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

2 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!