美文网首页
使用localhost可以访问本地mysql数据库,使用IP地址

使用localhost可以访问本地mysql数据库,使用IP地址

作者: 黑狼_佩恩 | 来源:发表于2020-04-01 11:19 被阅读0次

    1、将本地的mysql数据库设置为允许远程访问

    use mysql;

    mysql>grant all privileges on . to 'root'@'%' with grant option;

    mysql>update user set password=password('密码') where user='root';

    mysql>flush privileges;

    mysql>exit
    重启mysql服务 ,自此可以ip访问本地数据库

    如果其他计算机仍然无法访问。就在winds防火墙设置访问规则,允许访问3306端口。
    https://www.jianshu.com/p/df63d2fbf3b5

    相关文章

      网友评论

          本文标题:使用localhost可以访问本地mysql数据库,使用IP地址

          本文链接:https://www.haomeiwen.com/subject/pvyouhtx.html