• mysql用户管理与权限


    1、设置密码

    set password for 用户名@localhost = password('密码');

    2、取消密码

    set password for 用户名@localhost = password('');

    3、创建账号

    create user admin identified by '123';

    create user 'admin'@'%' identified by '123';

    4、删除账号

    delete from mysql.user where user=用户名;

    drop user 用户名;

    5、授权并建立账号

    grant all privileges on *.* to 用户名@localhost;--创建一个只能本地登录的空密码用户

    grant all privileges on *.* to '用户名'@localhost identified by 密码;--创建一个只能本地登录的用户

    grant all privileges on *.* to '用户名'@'%': --创建一个可以远程登录的用户

    6、收回权限

    revoke all privileges on *.* from '用户名'@'%':

  • 相关阅读:
    oracle学习13
    oracle学习12
    oracle学习11
    oracle学习10
    CodeForces
    CodeForces
    UVA
    poj3320 Jessica's Reading Problem
    poj2456 Aggressive cows
    jQuery 鼠标滚轮插件 mousewheel
  • 原文地址:https://www.cnblogs.com/orna/p/8334263.html
Copyright © 2020-2023  润新知