更改MySQL 5.6默认端口时出错

我已经改变了端口= 3308 my.ini,但重新启动服务MySQL 5.6工作在相同的默认端口3306。

我试过在MySQL 5.5中,它工作正常。

C:\ Program Files \ MySQL \ MySQL Server 5.6

的my.ini

# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... port = 3309 # server_id = ..... 

我错过了什么? 有没有错误?

在我的情况下,MySQL 5.6 my.ini文件位于存储数据的path中

 C:\Documents and Settings\All Users\Datos de programa\MySQL\MySQL Server 5.6 

而不是安装mysql的path

 C:\Archivos de programa\MySQL\MySQL Server 5.6 

,像旧版本。

我们必须将C:\ Documents and Settings \ All Users \ Datos de programa \ MySQL \ MySQL Server 5.6 \ my.ini文件更改为生效,然后重新启动服务。

在Windows上,MySQL程序按指定的顺序从以下文件读取启动选项

在这里输入图像说明

更多信息使用选项文件

您可以通过以下命令查看configuration选项,并查看“默认选项”以查看configuration.ini和.cnf的path。

 > mysqld --verbose --help 

和这个其他的命令,你可以看到MySQLvariables

 > mysqladmin variables