mysql登录,改密,授权,远程连接

来源:互联网 发布:大学软件学院排名 编辑:程序博客网 时间:2024/06/07 20:56

以特殊身份登录:mysql -u root -p xxxx -h 127.0.0.1(user :root,password:xxxx,host:127.0.0.1)

创建用户:命令:CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; (user:username,password:password,host:localhost

授权所有数据库: grant all privileges on *.* to 'root'@'localhost' identified by '' with grant option;(*.*:所有用户,user :root,password:‘’,host:localhost

授权刷新|:flush privileges;