mysql权限

mysql数据库权限问题:

root :拥有所有权限(可以干任何事情)

权限账户,只拥有部分权限(CURD)例如,只能操作某个数据库的某张表
– 如何修改mysql的用户密码?
– password: md5加密函数(单向加密)
SELECT PASSWORD(‘root’); – *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B

mysql数据库,用户配置 : user表
USE mysql;

SELECT * FROM USER;

修改密码
UPDATE USER SET PASSWORD=PASSWORD(‘123456’) WHERE USER=’root’;

分配权限账户
GRANT SELECT ON day16.employee TO ‘eric’@’localhost’ IDENTIFIED BY ‘123456’;
GRANT DELETE ON day16.employee TO ‘eric’@’localhost’ IDENTIFIED BY ‘123456’;

你可能感兴趣的:(mysql,权限)