Results 1 to 5 of 5

Thread: MySQL remote access

  1. #1

    Default MySQL remote access

    Hi, we have a java newsletter manager which uses MySQL as a database. When the application runs on the localhost it works but we need to access the database from other clients in the local area network.

    I found this line on a website... bind-address = {server ip}

    I have done this, and restarted mysql but no luck so far. I have installed MySQL using YAST. What could be the problem? Does openSUSE 11.2 use a firewall in the default desktop edition? Thanks

    Thanks

  2. #2

    Default Re: MySQL remote access

    Yes. Firewall. Yast -> Security and Users -> Firewall -> Allowed Services. Open port for MySQL server.

    Hope this helps.

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: MySQL remote access

    Well, not only do you have to check the firewall, but also the GRANTs in MySQL. Usually when apps need a DB, the instructions say to run a command like:

    GRANT ALL ON somedatabase.* TO someuser@localhost IDENTIFIED BY 'somepassword';

    Obviously that will only allow localhost clients to connect. You have to add another GRANT for someuser@<ip address of client> or someuser@'%' for all remote clients. You have to try it from the client with the mysql command line utility. No response means firewall blocking. Connection rejected means no authorisation.

    You shouldn't need to change the listen directive. It should listen on all interfaces by default. In fact if you change that to listen only on the server's IP,. then it will not be listening on 127.0.0.1. However localhost as a MySQL hostname actually means the Unix socket, so you may not notice it's not listening on 127.0.0.1.

  4. #4

    Default Re: MySQL remote access

    Hi!

    It's working now thanks for your prompt replies! The openSUSE community never fails to impress me! Thanks again!!

    Regards,
    Samuel

  5. #5

    Default Re: MySQL remote access

    BTW.. the problem was both the firewall and the user permissions.

Posting Permissions

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