title: Connecting to SQL server, getting error 2013 (HY000) Lost connection
body: <p>I am on Linux, trying to connect to SQL server.</p>
  
  <p>Using sqlplus, as below:</p>
  
  <pre><code> sqlplus username/password@server:port;
  </code></pre>
  
  <p>Getting <strong>ORA-12537</strong> error - "TNS: Connection closed". This error comes after a long wait.</p>
  
  <p>While trying to figure out what the issue was, I got -</p>
  
  <ul>
  <li>"TNSPING server:port" returned error : TNS-12537 TNS Connection closed.</li>
  <li>"TELNET server port" is working fine. It shows connected status.</li>
  <li>Also tried using Easy connect after reading another post <a href="https://stackoverflow.com/questions/761418/how-come-sqlplus-not-connecting">LINK</a>. This is the command I tried "sqlplus username/password@//server/port". It gave me error ORA-12541 : TNS: No listener.</li>
  </ul>
  
  <p>Just want to add that I am able to connect to an Oracle db using sqlplus, with no problem.
  Version is 10.2.0.4.</p>
  
  <p>Any idea how to fix this? Appreciate the help!</p>
  
  <p><strong>UPDATE</strong>: I did not know sqlplus can't connect to SQL server. I tried connecting using mysql, but got an error:</p>
  
  <pre><code> MYSQL -h server -P port -u username -ppassword
  </code></pre>
  
  <p>returned error : ERROR 2013 (HY000): Lost connection to mysql server at 'reading initial communication packet', system error 104. This error also comes after a long wait.</p>
  
  <p>Thanks for your help!</p>