Find the answer to your Linux question:
Results 1 to 2 of 2
Hi ! I am using CentOS 5, on which I have mysqlserver running.. The issue is I have setup mysql server to be accessed remotely by editing my.cnf. I have ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Location
    Ludhiana,Punjab
    Posts
    50

    Exclamation Remote MySQL Server issue in CentOS

    Hi ! I am using CentOS 5, on which I have mysqlserver running.. The issue is I have setup mysql server to be accessed remotely by editing my.cnf.
    I have added following two lines to my.cnf:
    Code:
    bind_ipaddress 192.168.1.2
    #skip_networking
    Now Database is available remotely. like following PHP script can access the db from remote:
    Code:
    <?php
    mysql_connect("192.168.1.2","user","password") or die(mysql_error);
    ?>
    But the problem is if I execute above script on the server, it doesn't connect to server and gives an error to unable to connect to 192.168.1.2.
    I have given all the permissions to dbuser to access from any host.. by issuing the following commands:
    Code:
    GRANT ALL ON database.* TO user@'localhost' IDENTIFIED BY 'PASSWORD';
    GRANT ALL ON database.* TO user@'127.0.0.1' IDENTIFIED BY 'PASSWORD';
    GRANT ALL ON database.* TO user@'192.168.1.2' IDENTIFIED BY 'PASSWORD';
    but still it is not working..
    Can somebody suggest me the way out?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Have you tried connecting to "localhost" or "127.0.0.1"?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...