首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更改MySQL5.6默认端口时出错

更改MySQL5.6默认端口时出错
EN

Server Fault用户
提问于 2014-06-17 12:39:15
回答 1查看 2.4K关注 0票数 0

我已经用my.ini更改了port=3308,但是在重新启动服务之后,MySQL5.6在相同的默认端口3306中工作。

我在MySQL5.5中尝试过,它运行得很好。

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

my.ini

代码语言:javascript
复制
# 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 = .....

我遗漏了什么?有窃听器吗?

EN

回答 1

Server Fault用户

发布于 2014-06-17 13:25:53

MySQL 5.6 my.ini文件位于存储数据的路径中,在我的示例中

代码语言:javascript
复制
C:\Documents and Settings\All Users\Datos de programa\MySQL\MySQL Server 5.6 

而不是安装mysql的路径。

代码语言:javascript
复制
C:\Archivos de programa\MySQL\MySQL Server 5.6

就像以前的版本一样。

我们必须更改C:\Documents和Settings\所有用户\\MySQL\MySQL服务器5.6 \my.ini文件以生效,并重新启动服务。

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

更多信息使用选项文件

您可以通过以下命令查看配置选项,并查找“默认选项”以查看配置.ini和.cnf所在的路径。

代码语言:javascript
复制
> mysqld --verbose --help

使用另一个命令,您可以看到mysql变量。

代码语言:javascript
复制
> mysqladmin variables
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/605734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档