Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Apr 2005
    Posts
    50

    Default change mysql default port

    Hi,
    Iīve seen that my mysql server is having a lot of refused connections. I donīt know how to check if this is normal or hacks attempts.
    Iīve checked this using MONyog from http://www.webyog.com/.
    I thought that I could change the default port in my.cnf but I donīt know if cpanel will put that in the default after some update.

    Can you help me in the best way for doing this ? Thanks..

  2. #2
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    The easiest way to accomplish this is to first run a good firewall and ruleset.
    with that done, simply disable public connections to mysql by adding this
    into /etc/my.cnf

    skip-networking

    this will allow localhost connections only without changing the port.

  3. #3
    Member
    Join Date
    Apr 2005
    Posts
    50

    Default

    I donīt have a firewall and Iīm a litle bit afraid of breaking it now..I think I have to think of it more seriously..
    as for skip-networking I already have that but I donīt like people hammering at my door
    Is there any log where we can check who is trying to enter ?
    Thanks for your reply.

  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    Your main concern would/should be a firewall. You are worried about taking a bullet in the heart but nothing else is protected. Get your server locked down. As far as everyone knocking on your door for port 3306, they will do that regardless if they see that port or not. You are not connectible to addresses outside the localhost even if someone did have your mysql root password, so its not a concern

  5. #5
    Member
    Join Date
    Aug 2006
    Posts
    20

    Default

    and if you want to see who is trying to enter check your logs!

    /var/log

  6. #6
    Member
    Join Date
    Apr 2005
    Posts
    50

    Default

    thanks you both,
    there are a lot of logs in there. Which one should I check ? messages, secure ?

Similar Threads & Tags
Similar threads

  1. Change default cpanel and whm port from 2086 and 2082 to custom port
    By alok86 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-05-2011, 04:01 PM
  2. Change the default apache port
    By Bkmz in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-23-2011, 02:28 AM
  3. Change Default Mysql Port and restrict to IP ?
    By fuzioneer in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-03-2008, 06:50 PM
  4. change default port
    By majidnt in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 09-20-2005, 02:58 PM
  5. change default pop mail port
    By ne0shell in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-15-2004, 04:49 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube