_____________________________________________________
  ________|                                                     |________
  \       |             OPENING PORT 3306 on SME                |       /
   \      |       Contributed by MD (mdrone@tech-geeks.org)     |      /
   /      |_____________________________________________________|      \
  /___________)                                              (__________\

        How to Access the MySQL Server on SME6+ from the Outside World

Overview: 
In previous versions of SME/Esmith (4.x, 5.x), port 3306 was open to the public.  It was convenient to set up a PuTTY tunnel to localhost:3306 and administer the MySQL server using a variety of Win32 tools (SQLyog, DBTools, MySQL Control Center, MySQL Administrator).  The last version of the SME server (version 6.0) sets the properties of mysql to be accessible via the local network only.   In order to change that setting, three commands must be issued  from the command line.  Scripting these commands into a menu makes it easy to toggle the system between Public and Private modes.

Procedure:

1) Check to see if your server is listening on port 3306.
On a 5.x server, you should see that it is listening on 0.0.0.0:3306, but on a 6.0 server, public access is not available by default.  On your server, use the netstat  command as follows to see what ports are available and in use.
 
(this example shows only tcp numerical ports)

        [root@smeserver root]# netstat -ant
        Active Internet connections (servers and established)
        Proto Recv-Q Send-Q Local Address           Foreign Address         State
        tcp        0      0 0.0.0.0:515             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:548             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:113             0.0.0.0:*               LISTEN
        tcp        0      0 127.0.0.1:980           0.0.0.0:*               LISTEN
        tcp        0      0 207.63.83.202:53        0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:3128            0.0.0.0:*               LISTEN
        tcp        0      0 127.0.0.1:12345         0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:1723            0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
        tcp        0      0 207.63.83.202:22        12.34.177.116:1068      ESTABLISHED

* Notice that there is an SSH connection ESTABLISHED, but the server is not listening on port 3306

2) There are three commands that will instruct the server to listen on port 3306 (Generously contributed by "Guest" via the forum at http://www.contribs.org)

        # /sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
        # /sbin/e-smith/expand-template /etc/my.cnf
        # /etc/rc.d/rc7.d/S90mysqld restart

With the last command I have to substitue S50mysqld, I found this by ls /etc/rc.d/rc7.d and hunting for "mysqld"

3) Once these commands are issued, run the netstat -ant command again:

        [root@smeserver root]# netstat -ant
        Active Internet connections (servers and established)
        Proto Recv-Q Send-Q Local Address           Foreign Address         State
        tcp        0      0 0.0.0.0:515             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:548             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:113             0.0.0.0:*               LISTEN
        tcp        0      0 127.0.0.1:980           0.0.0.0:*               LISTEN
        tcp        0      0 207.63.83.202:53        0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:3128            0.0.0.0:*               LISTEN
        tcp        0      0 127.0.0.1:12345         0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:1723            0.0.0.0:*               LISTEN
        tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
        tcp        0   1012 207.63.83.202:22        12.34.177.116:1068      ESTABLISHED

* Notice that the server is now listening on port 3306