title: How to change mysql.sock?
body: <p>I have installed mysql through binary installation and followed below steps
  <a href="http://dev.mysql.com/doc/refman/5.0/en/binary-installation.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.0/en/binary-installation.html</a></p>
  
  <p>Right now sock files are craeted on /tmp/mysql.sock when mysql service is started.</p>
  
  <p>I want to know which configuration files need to be edited to change the path of mysql.sock </p>
  
  <p>I tried the following steps to change mysql.sock path from /tmp/mysql.sock to /var/lib/mysql/mysql.sock</p>
  
  <p>1.I tried to enter socketpath in /etc/my.cnf </p>
  
  <pre><code>socket =/var/lib/mysql/mysql.sock
  </code></pre>
  
  <p>2./etc/init.d/mysql</p>
  
  <pre><code>basedir=/var/lib/mysql
  datadir=/var/lib/mysql/data
  socket=/var/lib/mysql/mysql.sock
  </code></pre>
  
  <p>Can anybody help me to fix this issue.</p>