Help to change mysql.sock -


i have installed mysql through binary installation , followed below steps http://dev.mysql.com/doc/refman/5.0/en/binary-installation.html

right sock files craeted on /tmp/mysql.sock when mysql service started.

i want know configuration files need edited change path of mysql.sock

i tried following steps change mysql.sock path /tmp/mysql.sock /var/lib/mysql/mysql.sock

1.i tried enter socketpath in /etc/my.cnf socket =/var/lib/mysql/mysql.sock

2./etc/init.d/mysql basedir=/var/lib/mysql datadir=/var/lib/mysql/data socket=/var/lib/mysql/mysql.sock

can me fix issue.

setting these variables in my.cnf should work fine (tested locally, ubuntu 10.10).

[mysqld]  datadir=/var/lib/mysql  socket=/var/lib/mysql/mysql.sock 

just make sure you're restarting mysql service?

below did, on fedora (since you're using rhel should more mimic setup):

[root@rudi /]# ls /var/lib/mysql/ ibdata1  ib_logfile0  ib_logfile1  mysql  mysql.sock [root@rudi /]# ls /var/run/mysqld/ mysqld.pid [root@rudi /]# nano /etc/my.cnf  [root@rudi /]# service mysqld restart stopping mysqld:                                           [  ok  ] starting mysqld:                                           [  ok  ] [root@rudi /]# ls /var/lib/mysql/ ibdata1  ib_logfile0  ib_logfile1  mysql [root@rudi /]# ls /var/run/mysqld/ mysqld.pid  mysql.sock 

the thing changed socket= time, , restarting still worked fine.

are sure you're not editing socket within [client] section of my.cnf? must under [mysqld] section.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -