Skip to main content

MySQL is listening only on a local address

Comments

9 comments

  • cPRex Jurassic Moderator

    Hey there!  I would still expect MySQL to show a basic service restart in the logs, so that should be a valid test.

    0
  • toplisek

    I kindly ask you to send me more information how to perform validation using a Linux command.

    0
  • cPRex Jurassic Moderator

    I'm not sure what you mean - what specifically are you looking to validate on the system and what issues are you having?

    0
  • toplisek

    There is security warning if MySQL is listening NOT only on a local address. We like to perform commands using Linux command. Security Advisor shows validation within WHM. We like to execute a Linux command.

    0
  • cPRex Jurassic Moderator

    Can you tell me specifically what you're trying to do?  I just don't understand what command you're looking for or what you're trying to fix.

    0
  • toplisek
    • Open the MySQL configuration file. On most Linux distributions (such as Ubuntu/Debian), this is located at /etc/mysql/mysql.conf.d/mysqld.cnf or /etc/my.cnf.
    • Find the bind-address directive. By default, it looks like this:
      bind-address = 127.0.0.1
    • Change 127.0.0.1 to 0.0.0.0 to listen on all available network interfaces, or specify a particular private IP address:
      ini
      I try to validate all accounts within account is the correct settings MySQL configuration file.
      bind-address = 0.0.0.0
      
    0
  • cPRex Jurassic Moderator

    In general, that configuration isn't something we recommend for security reasons, but I wouldn't expect this to change the behavior of the MySQL logs or how those logs are written.

    0
  • toplisek

    Please find more information what we try to set it up. An example: How do we know a remote login is disabled within WHM?

    Even with the correct password, access will fail if:

    • the user account is restricted to localhost (user@localhost)
    • remote login is disabled
    • the server only listens on 127.0.0.1
    • firewall blocks port 3306
    • fail2ban/WAF/security policies deny acces

    2. Check what interface MySQL is listening on:

    sudo ss -tulpn | grep 3306

     

    0
  • cPRex Jurassic Moderator

    I'm sorry - I'm still not sure what you're trying to do here or what you need me to check.  Can you let me know specifically what you're trying to do?

    0

Please sign in to leave a comment.