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
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