mysql 用户管理

8月 24, 2014 |

create user 'username'@'hostname' identified with mysql_native_password;
set old_passwords=0;
set password for 'username'@'hostname'=password('123456');

 

identified with 是指定加密实现模块,密码为空

identified by ‘xxx’使用默认的加密模块加密,密码为'xxx'

set old_passwords设置加密的方式old_passwords=0是调用mysql_native_password模块加密

Posted in: MySQL practise | Tags: , , , ,

Comments are closed.