This mysql.sock should be MySQL host and client on the same host, use UNIX domain socket as the carrier of communication protocol, it is faster than TCP. The common cause of this problem is that your MySQL server is not running.
There are two ways to connect MySQL:
(1), TCP/IP
(2), socket
For Mysql.sock, the function is that the program is in the same machine as the MySQLServer and is available when the local connection is initiated.
For example, you do not need to define a specific IP to connect to the host, as long as it is empty or localhost.
In this case, even if you change the external port of MySQL It is also possible to connect normally.
Since you changed the port in My.ini or MY.CNF, the Mysql.sock is generated with every MySQL server startup. The information has been changed since you restarted MySQL when you finished changing the my.cnf.
Then for an external connection, you must change the port to connect.
Linux under the installation of MySQL connection often back to say that the Mysql.sock file is not found, the solution is simple:
If it is a new installation of MySQL, the prompt cannot find the file, just search under, specify the correct location.
If the Mysql.sock file is mistakenly deleted, you will need to restart the MySQL service, if the restart is successful, will be generated under the DataDir directory Mysql.sock then specify.
If not, you can choose to connect with TCP connection, in fact, under Windows also support pipeline connection mode.