title: mysql error Can't connect to local MySQL server through socket '192.168.250.99'
body: <p>while trying to login to mysql , getting error:</p>
  
  <pre><code>**[root@kics ]# mysql -u&lt;user&gt; -p&lt;password&gt; &lt;dbName&gt;
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '192.168.250.99' (2)**
  </code></pre>
  
  <p>i searched over internet , but only getting answers for</p>
  
  <pre><code>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
  </code></pre>
  
  <p>actually 192.168.250.99 is my own machine ip., when i use
   <code>mysql -h127.0.0.1 -u&lt;user&gt; -p&lt;password&gt; &lt;dbName&gt;</code> , its getting logged in but not with <code>mysql -u&lt;user&gt; -p&lt;password&gt; &lt;dbName&gt;</code> </p>
  
  <p>As its enterprise application , i cant post my.cnf. kindly tell me value of which field i can provide</p>
  
  <p>After restarting machine , i am able to log in . But i need to restart it every time , then doing some operations on application , i am facing such issues again and again</p>
  
  <pre><code>[root@krishna etc]# /usr/bin/mysqladmin -u root password 'pwd'
  /usr/bin/mysqladmin: connect to server at 'localhost' failed
  error: 'Can't connect to local MySQL server through socket '192.168.250.99' (2)'
  Check that mysqld is running and that the socket: '192.168.250.99' exists!
  </code></pre>
  
  <p>Kindly help.
  Thanks</p>