一.查看默认端口号 1.登录mysql [root@localhost ~]# mysql -uroot -pEnter password: 输入数据库密码: 2.使用show global variables like 'port'; 命令查看端口号, mysql> show global variables like 'port';+---------------+-------+| Variable_name | Value |+---------------+-------+| port…