zoukankan      html  css  js  c++  java
  • linux下mysql权限配置

    先登入mysql
    mysql -u root -p

    然后回车键入密码!

    1.2 赋予主机B操作数据库的权限

    mysql> grant usage on *.* to username@192.168.0.1 identified by 'password';

    说明:赋予username@192.168.0.1 使用所有数据库的权限,在主机192.168.0.1上使用username账户登录,密码为:password

    mysql> grant usage on *.* to username identified by 'password';

    说明:赋予username使用所有数据库的权限,在所有主机上使用username账户登录,密码为:password

    mysql> grant all privileges on newdb.* to username@192.168.0.1;

    说明:赋予username@192.168.0.1 操作数据库newdb的最高权限,在主机192.168.0.1上使用username账户登录,无密码

    举例:

    mysql> grant all privileges on *.* to root@192.168.0.1 identified by '123456' ;

    说明:赋予root@192.168.0.1 使用所有数据库的权限,在主机192.168.0.1上使用root账户登录,密码为:123456

    移除账户

    mysql> drop user root@192.168.0.1;

    说明:移除账户root,这样,主机192.168.0.1就不再可以使用root用户操作服务器上的数据库

    使权限生效

    mysql> flush privileges;
  • 相关阅读:
    SiteMap Editor for Microsoft Dynamics CRM 2011 使用说明
    Microsoft Dynamics CRM 2011 如何导入组织
    SQL server 2008数据库的备份与还原(转)
    css列表
    css栅格
    css-排版
    类的操作
    事件的委派
    正则验证手机号和电子邮件
    div跟随鼠标移动
  • 原文地址:https://www.cnblogs.com/simon-sun/p/3349839.html
Copyright © 2011-2022 走看看