DB/MariaDB
[MariaDB] MariaDB 접속 포트 확인
alien22c
2024. 3. 4. 12:46
728x90
728x90
1) MariaDB에 직접 접속하여 포트 확인
SHOW GLOBAL VARIABLES LIKE 'PORT';
maria1@ubuntu:~/mariadb$ mysql -u maria1 -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 7 Server version: 10.5.23-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'PORT'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 3306 | +---------------+-------+ 1 row in set (0.001 sec) |
2) OS에서 MariaDB 포트 확인
netstat -tnlp
maria1@ubuntu:~/mariadb$ netstat -tnlp (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:17060 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::10050 :::* LISTEN - tcp6 0 0 :::3306 :::* LISTEN 3944821/mariadbd tcp6 0 0 :::9100 :::* LISTEN - tcp6 0 0 :::22 :::* LISTEN - |
728x90
728x90