• mysql开启远程访问权限


    1. 
    //登录数据库
      mysql -u root -pvmwaremysql>use mysql;
      //%为所有ip都可以远程访问
      mysql>update user set host = '%' where user = 'root';
    //或直接添加一条语句也行   
    mysql>insert into user (host,user,password) values('192.168.0.51','root',password('123'));  
      //查看一下修改
      mysql>select host, user from user;
    //推送设置到内存或重启服务器也行
      mysql>FLUSH PRIVILEGES

    2.  
    GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%'IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
    如果是固定ip就这么写
    grant all privileges on *.* to 'root'@'192.168.0.49'identified by '123' with grant option;
    //推送设置到内存或重启服务器也行
      mysql>FLUSH PRIVILEGES
  • 相关阅读:
    算法训练 接水问题
    算法训练 数组排序去重
    算法训练 A+B Problem
    算法训练 采油区域
    算法训练 会议中心
    JS高级
    JS基础操作
    JavaScript入门(基础)
    表格与表单
    音频与视频
  • 原文地址:https://www.cnblogs.com/liuxiaoji/p/8335411.html
Copyright © 2020-2023  润新知