المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : حل مشكلة How to Fix the Security Advisor MySQL Alert



Rise Company
14-01-2020, 00:57
حل مشكلة How to Fix the Security Advisor MySQL Alert
The MySQL service is currently configured to listen on all interfaces: (bind-address=*)
Configure bind-address=127.0.0.1 in /etc/my.cnf, or close port 3306 in the server’s firewall.

Security Advisor Scan



To check for the MySQL service warning, first Login WHM as root.
Select Security Advisor from the menu to start the scan.
https://www.rise.company/forum/images/imported/2020/01/62.png
Check for the MySQL service alert.
https://www.rise.company/forum/images/imported/2020/01/63.png

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



SSH into your server as root.
Edit the /etc/my.cnf file and add
bind-address=127.0.0.1 to the file. To do so using nano editor:
Type
nano /etc/my.cnf and press
Enter ⤶ to open the file. Scroll to the bottom of the file using the
Down arrow and add
bind-address=127.0.0.1 . Press
Control and
x for the save prompt before exiting. Press
y , then
Enter ⤶ to save the file.
https://www.rise.company/forum/images/imported/2020/01/64.png
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.


Select ConfigServer Security & Firewall from the WHM menu.
Under csf – ConfigServer Firewall select Firewall Configuration.
https://www.rise.company/forum/images/imported/2020/01/65.png
Under IPv4 Port Settings and Allow incoming TCP ports, remove “3306” from the text field.
https://www.rise.company/forum/images/imported/2020/01/66.png (https://imh01-inmotionhosting1.netdna-ssl.com/support/images/stories/whm/whm-security-advisor-mysql-4-block-3306-2.png)
Select Change at the bottom, then Restart csf+lfd.
https://www.rise.company/forum/images/imported/2020/01/67.png (https://imh01-inmotionhosting1.netdna-ssl.com/support/images/stories/whm/whm-security-advisor-mysql-6-block-3306-4.png)
Afterwards, rescan with cPanel Security Advisor to ensure the error doesn’t recur.




ملحوظة : بمجرد تثبيت CSF هو يغلق هذا البورت 3306 دون ان يتطلب منك عمل اي شىء.