数据库:linux 查看mysql端口

版权声明:原创内容,欢迎转载 https://blog.csdn.net/weixin_43731793/article/details/91409840

1、登录mysql

[root@localhost ~]# mysql -uroot -p
Enter password: 输入数据库密码;

2、使用show global variables like ‘port’; 命令查看端口号,

mysql> show global variables like 'port';
±--------------±------+
| Variable_name | Value |
±--------------±------+
| port | 3306 |
±--------------±------+
1 row in set (0.00 sec)

mysql>

3306即为端口号。

猜你喜欢

转载自blog.csdn.net/weixin_43731793/article/details/91409840