Mysql新创建用户

来源:互联网 发布:软件乚g公司 编辑:程序博客网 时间:2024/06/05 12:44

命令: use mysql;

insert into user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values("localhost","chen",password("1234"),"","","");

flush privileges;

记得要刷新系统权限表,否则无法登陆

或者使用命令:grant all on *.* to chen@'localhost' identified by '1234';


更改密码

update mysql.user set Password=password("newpasswd") where User="chen" and Host="localhost";

flush privileges;

0 0
原创粉丝点击