找回密码
 注册

微信扫码登录

使用验证码登录

只需一步,快速开始

胜天工科技销售各种数字电视信号调制卡胜天工科技销售各种数字电视信号码流卡

【游客、新手、注册会员的区别】 【积分策略和会员晋级说明】 【发帖和附件上传规则】 【如何下载感兴趣的资料】 【如何获取梦游币】 【侵权资料处理及免责说明】
查看: 4898|回复: 1

如何修改mysql默认端口号3306?

[复制链接]
  • TA的每日心情
    开心
    2026-4-27 11:48
  • 签到天数: 4186 天

    [LV.Master]伴坛终老

    发表于 2011-1-2 11:36:26 | 显示全部楼层 |阅读模式
    分享到:
    消息来自- 北京朝阳
    1)把MySQL服务先停止;

    2)修改my.ini如下内容:
    CLIENT SECTION
    # ----------------------------------------------------------------------
    #
    # The following options will be read by MySQL client applications.
    # Note that only client applications shipped by MySQL are guaranteed
    # to read this section. If you want your own MySQL client program to
    # honor these values, you need to specify it as an option during the
    # MySQL client library initialization.
    #
    [client]
    port=3306
    ...................
    ...................

    # 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


    把默认的3306端口最好修改为6位以上的端口。不容易被黑客攻击。

    3)然后,重启MySQL服务。
    这时MySQL的端口已经更改了。

    4)在phpMyAdmin的config.inc.php文件中,修改:
    $cfg['Servers'][$i]['port'] = '3306';

    该用户从未签到

    发表于 2014-2-28 02:34:57 | 显示全部楼层
    消息来自- 德国
    好文!
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    QQ|Archiver|手机版|小黑屋|数字电视开发网 ( 京ICP备16008897号-5 )

    GMT+8, 2026-5-14 08:19 , Processed in 0.123217 second(s), 23 queries , Gzip On.

    Powered by Discuz! X3.5

    © 2001-2026 Discuz! Team.

    快速回复 返回顶部 返回列表