• mysql远程访问授权


     用命令行工具,登录

    1、以下命令就可以授权

    @'%':远程访问授权 @'localhost'本机访问

    mysql> grant all privileges on *.* to '用户名'@'%' identified by '密码'
    with grant option;

    mysql> flush privileges;

    mysql> select host, user ,authentication_string from user;
    +-----------+---------------+-------------------------------------------+
    | host | user | authentication_string |
    +-----------+---------------+-------------------------------------------+
    | localhost | root | *F639C88D14D6F97EE915C916066C13C7E6127BEA |

    mysql5.7以上password改成了authentication_string。

    grant all privileges on `db`.* to 'user'@'%' identified by 'password';
    flush privileges;

    grant all privileges on `db`.* to 'user'@'localhost' identified by 'password';
    flush privileges;

    授权某个数据库访问权限

    参考:

    https://www.cnblogs.com/cnsdhzzl/p/11479808.html 

    https://www.cnblogs.com/youcong/p/10887068.html

  • 相关阅读:
    简易计算机
    作业-继承
    exception
    作业-窗口
    作业-数字
    作业8
    作业9-1
    作业9-2
    book
    成绩录入
  • 原文地址:https://www.cnblogs.com/jiduoduo/p/14012396.html
Copyright © 2020-2023  润新知