title: Unable to login to MYSQL getting error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
body: <p>I am not able to connect to mysql server getting error </p>
  
  <pre><code>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  </code></pre>
  
  <p>I have checked log :- </p>
  
  <pre><code>InnoDB: Apply batch completed
  130820  5:19:41  InnoDB: Error: the OS said file flush did not succeed
  130820  5:19:41  InnoDB: Operating system error number 5 in a file operation.
  InnoDB: Error number 5 means 'Input/output error'.
  InnoDB: Some operating system error numbers are described at
  InnoDB: http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html
  InnoDB: File operation call: 'flush'.
  InnoDB: Cannot continue operation.
  130820 05:19:42  mysqld ended
  </code></pre>
  
  <p>Due to this am not able to restart or start mysql </p>
  
  <pre><code>[root@OPX-VPC-DB-Report-Slave-2 ~]# service mysqld status
  mysqld is stopped
  [root@OPX-VPC-DB-Report-Slave-2 ~]# /etc/init.d/mysqld start
  Timeout error occurred trying to start MySQL Daemon.
  Starting MySQL:                                            [FAILED]
  [root@OPX-VPC-DB-Report-Slave-2 ~]#
  </code></pre>
  
  <p>I have searched a lot on internet but not found any solution </p>
  
  <p>I have configured RAID 0 and mount /mnt  directory and symlinc </p>
  
  <pre><code># ln -s /mnt/mysql_data/   /usr/lib/mysql
  # ln -s /mnt/mysql_run     /var/run/mysql
  </code></pre>
  
  <p>Yesterday there is an replication crashed so i have ran </p>
  
  <pre><code>SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
  </code></pre>
  
  <p>And again the replication is fine </p>
  
  <p>Please resolve my problem </p>
  
  <p>My configuration details is :"-</p>
  
  <pre><code>Fedora 6 and mysql 5.0.2
  
  Please help this is my production DB 
  </code></pre>