在安装mysql的目录下找到my.ini文件,然后把下面中port=3306改你想要的端口就行了. 我mysql的安装目录下为:C:\Program Files\MySQL\MySQL Server 4.1\my.ini [client]port=3306default-character-set=utf8 # SERVER SECTION # ---------------------------------------------------------------------- # # The following options will be read by the MySQL Server. Make sure that # you have installed the server correctly (see above) so it reads this # file. # [mysqld]# The TCP/IP Port the MySQL Server will listen on port=3306
我mysql的安装目录下为:C:\Program Files\MySQL\MySQL Server 4.1\my.ini
[client]port=3306default-character-set=utf8
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]# The TCP/IP Port the MySQL Server will listen on
port=3306