首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql 创造用户

2012-07-08 
mysql 创建用户1、查看用户名为user的用户的权限show grants for user@localhost当然use mysqlselect *

mysql 创建用户

1、查看用户名为user的用户的权限

show grants for user@'localhost';

当然

use mysql;

select * from user;

也可以

?

2、GRANT all ON jact.* TO 'user'@'localhost' IDENTIFIED BY 'user';

创建user,密码为user,授予所有权限,只能访问jact数据库,只能从localhost访问

?

3、对密码进行加密

set password=password('user');

?

热点排行