By default, MySQL try to connect localhost using Unix socket if there is no -h option or -h localhost:
mysql
mysql -h localhost
Force MySQL to use tcp connect instead of unit socket:
mysql -h 127.0.0.1
By default, MySQL try to connect localhost using Unix socket if there is no -h option or -h localhost:
mysql
mysql -h localhost
Force MySQL to use tcp connect instead of unit socket:
mysql -h 127.0.0.1