我已经用my.ini更改了port=3308,但是在重新启动服务之后,MySQL5.6在相同的默认端口3306中工作。
我在MySQL5.5中尝试过,它运行得很好。
C:\Archivos de programa\MySQL\MySQL Server 5.6
# 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 = .....我遗漏了什么?有窃听器吗?
@RolandoMySQLDBA
编辑
请运行以下命令
cd C:\Archivos de programa\MySQL\MySQL Server 5.5
dir
cd C:\Archivos de programa\MySQL\MySQL Server 5.6
dir并在这个问题中发布输出
发布于 2014-06-17 13:40:44
MySQL 5.6 my.ini文件位于存储数据的路径中,在我的示例中
C:\Documents and Settings\All Users\Datos de programa\MySQL\MySQL Server 5.6 而不是安装mysql的路径。
C:\Archivos de programa\MySQL\MySQL Server 5.6就像以前的版本一样。
我们必须更改C:\Documents和Settings\所有用户\\MySQL\MySQL服务器5.6 \my.ini文件以生效,并重新启动服务。
在Windows上,MySQL程序按指定的顺序从下列文件读取启动选项

更多信息使用选项文件
此外,还可以在注册表中使用regedit命令执行此操作。
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services和改变binPath
您可以通过以下命令查看配置选项,并查找“默认选项”以查看配置.ini和.cnf所在的路径。
> mysqld --verbose --help使用另一个命令,您可以看到mysql变量。
> mysqladmin variables通过查看服务属性,还可以看到mysql在选项上的可执行路径上使用的默认my.ini文件--默认文件。
可以通过命令行更改服务,可以使用sc config命令将服务指向的路径更改为:
SC CONFIG YourServiceName binPath= "C:\SomeDirectory\YourFile.EXE"这将更新名为YourServiceName的服务,并将“可执行路径”条目更改为C:\SomeDirectory\YourFile.EXE。
NET STOP YourServiceName & NET START YourServiceName发布于 2014-06-17 14:12:39
您需要确保正确的my.ini被编辑,您可以通过打开MySQL属性从windows服务中检查它,并确保它与MySQL 5.6相关。现在您需要停止服务,然后在服务描述中打开ini文件并编辑端口。最后,启动服务并尝试使用以下方法从CMD登录:
1) cd C:\Archivos de programa\MySQL\MySQL Server 5.6
2) mysql -uroot -Pport -ppassword
https://dba.stackexchange.com/questions/68407
复制相似问题