In the case of mysqld_multi configuring stand-alone multiple instances, how to make the client login specify the port number instead of specifying socket?

when configuring stand-alone multiple instances with mysqld_multi, use things such as

mysql -S /tmp/mysql_3306.sock -p   
mysql -S /tmp/mysql_3307.sock -p

this command is used for customer login, but if you specify the socket, instead of the port number
, mysql will use the default socket, instead of the above two socket, so that you cannot connect
what if you want to specify only the port number instead of socket
?

Mar.13,2021
Menu