frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

[Debian]How to allow(only ip) remote connection to mysql?

How to allow remote connection to mysql
Tagged:

Comments

  • ValentineValentine Administrator
    Hello,
    first you have to comment out this line in "/etc/mysql/my.cnf":
    #bind-address = 127.0.0.1

    Then you have to login to your MySQL server:
    mysql -u root -p

    And grant privileges to connect remotely to database for user from IP with password:
    mysql> GRANT ALL ON database.* TO user@’1.2.3.4’ IDENTIFIED BY ‘password’;
  • Valentine said:

    Hello,
    first you have to comment out this line in "/etc/mysql/my.cnf":
    #bind-address = 127.0.0.1

    Then you have to login to your MySQL server:
    mysql -u root -p

    And grant privileges to connect remotely to database for user from IP with password:

    mysql> GRANT ALL ON database.* TO user@’1.2.3.4’ IDENTIFIED BY ‘password’;
    IP 1.2.3.4 on my other server or host mysql ip?
    my vps(mysql) = 1.1.1.1
    my other server(gaming host) = 2.2.2.2
  • ValentineValentine Administrator
    You should change 1.2.3.4 IP to your remote host IP address which will connect to you MySQL server.
Sign In or Register to comment.

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2020 Time4VPS. All rights reserved.

Get In Touch