How to change value returned by 'mysql_config --socket'?

3.4k Views Asked by At

I'd like to get the location of the mysql.sock from the linux command line with a single command, msql_config returns the wrong value though (it specifies the default /var/lib/mysql/mysql.sock which does not exist) despite the fact mysql_admin uses the correct location.

Is there any way to update the value mysql_config is reporting for the socket to the correct location?

$ mysqladmin --print-defaults
mysqladmin would have been started with the following arguments:
--port=3306 --socket=/database/mysql.sock 

$ mysql_config --socket
/var/lib/mysql/mysql.sock
1

There are 1 best solutions below

1
On

Yes There is a way to update your correct path ..

You should use editor for mysql-config-editor.

See this link:

http://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html