Results 1 to 6 of 6
  1. #1

    Lightbulb How to secure access to MySQL database?

    What can I do to secure access to my MySQL database to stop it from getting compromised from hackers?

    Is there any way I can restrict access to the MySQL database to my IP only?

    The database is for an IPB 2.3.4 forum and the username/password are stored in a conf_global.php file that is CHMODed 0444.

    Any help would be greatly appreciated.

  2. #2
    You could just block port 3306. If the site is on the same server then it will still be able to access the database using localhost as the hostname.

    Or you can change the permissions of the mysql username and specify what hosts they can connect from.

  3. #3
    Join Date
    Nov 2005
    Posts
    352
    A lot of people just add "bind-address = 127.0.0.1" to the "[mysqld]" section of their my.cnf file to restrict access to localhost only.

  4. #4
    Hmm, what if I've already restricted it to localhost. Is there anything else I can do?

    Thanks for the advice by the way.

  5. #5
    then only people on your server can access it..

  6. #6
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,849
    Sure you can block direct access to MySQL at the firewall or within MySQL itself, but the most likely way you'd be hacked is through an insecure web application - in that situation the attacker would most likely be able to read your database login and connect from the server.

    So keep your applications secure - keep everything updated, don't allow file uploads, use suPHP if you have multiple accounts etc.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

Posting Permissions

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