mysql添加用户和用户权限
来源:互联网 发布:郑州市经开区地产数据 编辑:程序博客网 时间:2024/05/20 15:53
Mysql添加用户
使用可以对mysql数据库用户表有操作权限的用户名登陆mysql
insert into user(Host,User,Password)values('%','name','password');
如果work用户没有登陆权限,则
killall mysqld
share/mysql/mysql.server start
grant all on *.* to work@'%' identified by "password";
MySQL赋予用户权限的命令的简单格式为
grant 权限 on 数据库对象 to 用户
grant 权限 on 数据库对象 to 用户 identified by "密码"
用户名:ad,密码:ad_pass,登陆ip:192.168.0.10
//用户在所有登陆ip的权限
grant all on *.* to ad@‘%’ identified by "ad_pass";
//开放管理MySQL中所有数据库的权限
grant all on *.* to ad@'192.168.0.10' identified by"ad_pass";
//开放管理MySQL中具体数据库(test)的权限
grant all privileges on test to ad@'192.168.0.10' identified by"ad_pass";
或
grant all on test to ad@'192.168.0.10' identified by"ad_pass";
//开放管理MySQL中具体数据库中的表(test.table1)的权限
grant all on test.table1 to ad@'192.168.0.10' identified by"ad_pass"
//开放管理MySQL中具体数据库的表(test.table1)的部分列的权限
grant select(id,se,rank) on test.table1 to ad@'192.168.0.10'identified by "ad_pass";
//开放管理操作指令
grant select,insert,update,delete on test.* to ad@'192.168.0.10'identified by "ad_pass";
//回收权限
revoke all on *.* from ad@localhost;
//查看MySQL用户权限
show grants;
show grants for ad@localhost;
使用可以对mysql数据库用户表有操作权限的用户名登陆mysql
insert into user(Host,User,Password)values('%','name','password');
如果work用户没有登陆权限,则
killall mysqld
share/mysql/mysql.server start
grant all on *.* to work@'%' identified by "password";
MySQL赋予用户权限的命令的简单格式为
grant 权限 on 数据库对象 to 用户
grant 权限 on 数据库对象 to 用户 identified by "密码"
用户名:ad,密码:ad_pass,登陆ip:192.168.0.10
//用户在所有登陆ip的权限
grant all on *.* to ad@‘%’ identified by "ad_pass";
//开放管理MySQL中所有数据库的权限
grant all on *.* to ad@'192.168.0.10' identified by"ad_pass";
//开放管理MySQL中具体数据库(test)的权限
grant all privileges on test to ad@'192.168.0.10' identified by"ad_pass";
或
grant all on test to ad@'192.168.0.10' identified by"ad_pass";
//开放管理MySQL中具体数据库中的表(test.table1)的权限
grant all on test.table1 to ad@'192.168.0.10' identified by"ad_pass"
//开放管理MySQL中具体数据库的表(test.table1)的部分列的权限
grant select(id,se,rank) on test.table1 to ad@'192.168.0.10'identified by "ad_pass";
//开放管理操作指令
grant select,insert,update,delete on test.* to ad@'192.168.0.10'identified by "ad_pass";
//回收权限
revoke all on *.* from ad@localhost;
//查看MySQL用户权限
show grants;
show grants for ad@localhost;
0 0
- mysql添加用户和用户权限
- mysql数据库添加用户与用户权限
- linux下创建用户和添加用户权限
- Linux mysql添加用户,删除用户,以及用户权限
- MYSQL增加用户和修改用户权限
- Linux 环境下添加mysql用户、修改用户权限
- 创建用户和用户权限
- <liunx 学习> mysql 中新建用户和用户权限
- mysql创建数据库,表,用户和用户权限设置
- MySQL 用户及用户权限管理
- mysql用户及用户权限修改
- mysql添加用户和密码
- mysql 添加用户和授权
- mysql添加和删除用户
- mysql 添加和删除用户
- mysql 添加用户和授权
- MySQL添加用户和授权
- MySQL添加用户和授权
- GDB 栈信息
- DSP-BIOS使用入门
- Android开发(十二) Android 布局属性详解
- linux服务器开发浅谈
- LA3942 Trie+DP
- mysql添加用户和用户权限
- 收集的shell用法
- poj 1276 多重背包+二进制优化+单调队列优化
- Oracle md5加密
- 而gear噶尔
- 二哥啊噶而过
- 阿尔噶尔噶尔
- 基于visual studio 2013与opencv的环境配置
- 如何如何让法国女生