How to allow connections to MySQL service from outside the server?

Follow

Comments

4 comments

  • Avatar
    Arkiumscs

    In version 17.5.3 (Linux) :

    1. Replace "bind-address = ::ffff:127.0.0.1" with "bind-address = 0.0.0.0" ;
    2. Add the new line before "port = 3306" ;
    3. Then restart the server ;
    4. Test the port with : https://www.yougetsignal.com/tools/open-ports/
  • Avatar
    Bulat Tsydenov

    @Arkiumscs, can you please clarify the OS version you are referring to? Is it CentOS 6/7 or Ubuntu 14/16 or Debian 7/8 or some other OS? 

    In general, it is not required to specify 3306 port explicitly in my.cnf as 3306 port is used by default.

  • Avatar
    Arkiumscs

    Plesk 17.5.3 with OS Ubuntu 16.04.3 LTS

    In the file "my.cnf", I had the installation of Plesk on Ubuntu the content :

    [mysqld]
    sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    port = 3306
    bind-address = ::ffff:127.0.0.1
    local-infile=0

     

    The connection to port 3306 was not working and I had to replace:

    bind-address = ::ffff:127.0.0.1

    by

    bind-address = 0.0.0.0

     

  • Avatar
    Bulat Tsydenov

    @Arkiumscs, Yeap! This is exactly what the article suggests to do - to make MySQL listening not on localhost, but on public IPv4 address.

Please sign in to leave a comment.

Have more questions? Submit a request