方法1.:mysql> show variables like 'port'; 方法2:mysql> status; 方法3:mysql> show global variables like 'port';