• ems lite 客户端远程连接mysql server


    在本地用ems客户端远程连接虚拟机上的mysql server,弹出客户端没有权限访问mysql server。使用下面方法进行设置:
    mysql> select host,user,password from user;
    +-----------+------+-------------------------------------------+
    | host | user | password |
    +-----------+------+-------------------------------------------+
    | localhost | root | *FAAFFE644E901CFAFAEC7562415E5FAEC243B8B2 |
    | rac1 | root | *B68123C4CF08AA9400817DF977A72D557BD930CF |
    | 127.0.0.1 | root | *B68123C4CF08AA9400817DF977A72D557BD930CF |
    | ::1 | root | *B68123C4CF08AA9400817DF977A72D557BD930CF |
    +-----------+------+-------------------------------------------+
    4 rows in set (0.00 sec)
    创建一个要远程连接mysql server的用户并赋予相应权限:
    mysql> create user 'root'@'192.168.72.1';
    Query OK, 0 rows affected (0.00 sec)
    mysql> grant all on *.* to 'root'@'192.168.72.1' identified by 'root123';
    Query OK, 0 rows affected (0.00 sec)
    mysql> commit;
    Query OK, 0 rows affected (0.00 sec)
    mysql> select host,user,password from user;
    +--------------+------+-------------------------------------------+
    | host | user | password |
    +--------------+------+-------------------------------------------+
    | localhost | root | *FAAFFE644E901CFAFAEC7562415E5FAEC243B8B2 |
    | rac1 | root | *B68123C4CF08AA9400817DF977A72D557BD930CF |
    | 127.0.0.1 | root | *B68123C4CF08AA9400817DF977A72D557BD930CF |
    | ::1 | root | *B68123C4CF08AA9400817DF977A72D557BD930CF |
    | 192.168.72.1 | root | *FAAFFE644E901CFAFAEC7562415E5FAEC243B8B2 |
    +--------------+------+-------------------------------------------+
    5 rows in set (0.01 sec)

    然后再进行连接,ok。

    将host字段的值改为%就表示在任何客户端机器上能以root用户登录到mysql server,建议在开发时设为%。
    mysql> update user set host = '%' where user = 'root';
  • 相关阅读:
    js正则小记
    github相关
    js设置 获取 删除cookie
    js传递数据一些方式
    js call()方法
    DOM节点相关操作(兼容)
    git 常用命令总结
    js中的this指向
    angular 中 directive中的多个指令
    指令中 controller && controllerAs
  • 原文地址:https://www.cnblogs.com/zhaoshuangshuang/p/3309150.html
Copyright © 2020-2023  润新知