6.2.4 Connecting to the MySQL Server Using Command Options
https://dev.mysql.com/doc/refman/8.0/en/connecting.html
Aug 2, 2022 · To specify a port number explicitly, use the --port or -P option: mysql --host=remote.example.com --port=13306. You can specify a port number for connections to a local server, too. However, as indicated previously, connections to localhost on Unix use a socket file by default, so unless you force a TCP/IP connection as previously described ...
DA: 78 PA: 86 MOZ Rank: 48