20 mysqld processes using only 1 port? These are from Aliyun Cloud DB Servers，20 mysqld processes using one 3306 port








Has anyone seen this before ?
Can anybody explain how to do that ?
Are there any advantages to this ?
What we see is impossible, so the logical assumption is that it's an illusion.

Multiple MySQL server instances can't listen on the same port.  They also can't share the same pid file, as these do, nor can the data files for InnoDB be shared.  

The most sensible explanation for this is that the tools are showing you threads, not processes -- for whatever reason. Threads in Linux (if that's what this is) share the same process ID, but they also do have their own thread ID, a number that comes from the same numbering space as PIDs.

Most compelling, I suspect, is there are 20+ entries, each consuming 10.9% of available memory.  While it is highly unlikely for multiple identical instances if MySQL server to hold the same amount of memory (particularly the busy ones), it is impossible that your memory usage on this server is in excess of 200%.  

mysql&gt; SHOW FULL PROCESSLIST; when executed by a user with the SUPER or PROCESS privilege should show you the active client threads, and will likely contain entries representing to two that seem particularly busy, here.  Of course, there will be fewer in the output than are shown here, since not all threads are client threads.

Prove to yourself that there is really only one instance running, by repeatedly connecting and disconnecting and issuing SELECT CONNECTION_ID(), UUID_SHORT(); and/or by doing this on more than one connection at the same time. Both values will increment pretty much monitically (connection_id increments with each connection but remains the same while connected, uuid_short increments with each query) and will never be smaller.  This would be virtually impossible if multiple MySQL server daemon instances were involved.