--port (-P)

Overview

Port to connect to

See also: mariadb-shell for MariaDB Shell, in 22.12, and in 22.10

USAGE

mariadb-shell [{--port | -P} <port_number>]

DETAILS

Option

Default Behavior

Argument

--port
-P

If omitted, MariaDB Shell tries to connect to the default port (3306)

Port number

EXAMPLES

To connect to a host using a non-standard port number:

$ mariadb-shell \
   --host host.example.com \
   --port 43306 \
   --user user_name \
   --password 'user_password'

To use the short option names, the equivalent command is:

$ mariadb-shell \
   -h host.example.com \
   -P 43306 \
   -u user_name \
   -p 'user_password'

CHANGE HISTORY

Release Series

History

23.01

  • Present starting in MariaDB Shell 23.01.1.

22.12

  • Present starting in MariaDB Shell 22.12.1.

22.10

  • Present starting in MariaDB Shell 22.10.3.