how to secure mysql from hacking

Discussion in 'MySQL' started by Salman Qamar, Jul 27, 2010.

  1. #1
    from last 15 days i have faced 4 hacking attempts to my mysql database.
    I am using vbulettin4.0.5.
    The hacker just change in templete table in my database.
    Is there some settings option so that no hacker can make change in my database.
    I have tried chaning my database name and password but finally hacker hacks my database.
    How to get rid of this problem?
    my site url is
    [URL="http://www.it-pk.com"]www.it-pk.com[/URL]
    Code (markup):

     
    Salman Qamar, Jul 27, 2010 IP
  2. saadi123

    saadi123 Well-Known Member

    Messages:
    196
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    Though I am not very good in it but I guess the problem you are referring to is related to MYSQL or SQL injection where the visitor tries to hack the database through web forms. Your site sure has lot of these forms.

    So I advice you to use the function mysql_real_escape_string() for your forms. As I said that I am not very good in it therefore you can read for yourself from the following link. I hope this would be helpful. The link is:
    http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php
     
    saadi123, Jul 28, 2010 IP