1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

external mysql db access

Discussion in 'Plesk for Linux - 8.x and Older' started by parisdns, Jun 10, 2007.

  1. parisdns

    parisdns Guest

    0
     
    Hi, all, just wonder how can I setup under plesk to allow a external server to access the mysql db.

    Thanks.
     
  2. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Just make sure your firewall isn't blocking access to the MySQL port (3306) and it should just work.
     
  3. faris

    faris Guest

    0
     
    I think you also need to grant access to a user in the right way. By default a database user created through Plesk is user@localhost and trying to login from a remote location would be rejected because they are not connecting from localhost.

    So I think you need to GRANT xxx TO 'user'@'ipaddress' identified by 'password' for the database in question (or something like that --- I don't remember the syntax exactly).

    xxx could be ALL but that's a security risk. You should limit it to what's needed rather than ALL. Using @'ipaddress' limits the connection to the static IP where the remote connection is coming from. I think you can also use a domain instead of an IP, and therefore control the IP via a DNS entry. You may also be able to grant to user rather than user@ but it would be more sensible to limit it to an IP if possible, even if your fireall only allows access to port 3306 from their static IP. Every extra level of security you add helps!

    Have a look at the GRANT syntax to see what you can do. Like I say I can't remember the exact options off-hand.

    Faris.
     
  4. perfectpenguin

    perfectpenguin Guest

    0
     
    In addition to what has already been said, check your /etc/my.cnf file and make sure that skip-networking isn't in there. If it is, comment it out (#) and restart MySQL.

    All the best,

    Simon
     
Loading...