unbuntu mysql没开启tcp链接

编程入门 行业动态 更新时间:2024-10-20 05:43:48

unbuntu mysql没开启tcp<a href=https://www.elefans.com/category/jswz/34/1771394.html style=链接"/>

unbuntu mysql没开启tcp链接

特意查看了我的Linux版本

$ sudo lsb_release -a

显示如下:

Distributor ID: Ubuntu

Description: Ubuntu 16.04.1 LTS

Release: 16.04

Codename: xenial

1. 查看3306端口是否正常

[email protected]:~# netstat -an | grep 3306

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

注意:现在的3306端口绑定的IP地址是本地的127.0.0.1

2. 修改Mysql配置文件(注意路径,跟之前网上的很多版本位置都不一样)

[email protected]:~# vim /etc/mysql/mysql.conf.d/mysqldf

找到

bind-address = 127.0.0.1

前面加#注释掉

3. 重启Mysql

[email protected]:~# /etc/init.d/mysql restart

[ ok ] Restarting mysql (via systemctl): mysql.service.

4. 再次查看端口信息

[email protected]:~# netstat -an | grep 3306

tcp6 0 0 :::3306 :::* LISTEN

原文:.html

更多推荐

unbuntu mysql没开启tcp链接

本文发布于:2024-02-26 13:34:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1702668.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:链接   unbuntu   mysql   tcp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!