在命令行输入:
show global variables like 'port';
转自:https://blog.csdn.net/zhufengy/article/details/80147787