Results 1 to 2 of 2

Thread: Configure MySQL to listen on two ports

  1. #1
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010

    Default Configure MySQL to listen on two ports

    Does anyone know if it's possible to configure MySQL to listen on two ports, one configured for SSL and the other standard MySQL TCP.

    3306 Standard MySQL TCP
    3307 MySQL SSL

    That way I can have some systems in my lab and they can communicate between themselves (or on localhost) using 3306 but any connections coming in to the greater network would be limited to 3307 and require SSL (said delineation being enforced via a Firewall between the lab and greater network).

    I know MySQL can listen for both on 3306 (or whatever the default port is) and require SSL or not based on user, but I'm trying to make life slightly easier.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  2. #2
    Join Date
    Jan 2010


    I have never tried this, but you should be able to do it with iptables with ease. Just change the inbound packets ports.

    *Edit* I think I spoke too soon, looking at one of my MySQL databases to see if this does work.

    *Edit again*

    I can't test this unfortunately as I can't bugger up my current database. (I kind of need it to keep working... )

    However, if you run 2 different .cnf's as shown here:

    If you put the SSL keys in one and not the other it might work. No guarantees though!

Posting Permissions

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