title: why is mySQL connecting at any/all ports
body: <p>I'm running Linux Mint and trying to connect to mySQL this way</p>
  
  <pre><code>mysql --port=3306 -u root -p
  </code></pre>
  
  <p>Then it prompts me for my password. This is all fine. Why is it that when I type something like this it still works....</p>
  
  <pre><code>mysql --port=1234 -u root -p
  </code></pre>
  
  <p>Should that not fail since there is no mySQL server running on port 1234?</p>
  
  <p>The reason I am asking this is because I want to create a SSH tunnel to connect to a database on another server. Let's say the SSH tunnel will forward all my traffic from localhost:3308 to myremoteserver:3306. Since my local mySQL server is accepting my connections on all ports, I cannot actually connect to port 3308 and hit the remote server. I am still hitting my local server....</p>
  
  <p>Even if my SSH tunnel options might have been wrong, I was wondering if anyone knew why I can connect to port 1234 and it still hit my local mySQL server running on 3306?</p>