title: Changing the default mysql socket path
body: <p>I'm setting up a new Ubuntu computer, namely mysql. I've various rails app that use mysql on the socket /tmp/mysql.sock, and as they're group projects I can't change their db config options. </p>
  
  <p>"mysqladmin -u root -p  variables | grep socket" tells me my socket is  /var/run/mysqld/mysqld.sock. I also have a mysql directory /etc/mysql.</p>
  
  <p>I've read that I'm supposed to add the socket path to the my.cnf file in the etc/mysql directory, however it is locked for editing, and somehow reverts ownership immediately if I use chown to try and change it.</p>
  
  <p>Please advise me how I can change where mysql sets its default socket path. </p>