创建账户:create user ‘用户名’@’访问主机’ identified by ‘密码’;
赋予权限:grant 权限列表 on 数据库 to ‘用户名’@’访问主机’ ;(修改权限时在后面加with grant option)
mysql -u root -p
select user,host,authentication_string from mysql.user;
use mysql;
update user sethost='%' where user='root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
授权
create user 用户名 identified by '密码';
grant 权限 on 数据库.数据表 to '用户' @ '主机名';#授权
grant select,insert,update,delete,create,drop on vtdc.employee to joe@10.163.225.87 identified by ‘123′
(修改权限时在后面加with grant option)
grant all privileges on *.* to joe@10.163.225.87 identified by ‘123′;#刷新权限
FLUSH PRIVILEGES
#新建文件夹#修改数据库root密码
ALTER USER'root'@'localhost' IDENTIFIED BY '123456';
创建账户:create user ‘用户名’@’访问主机’ identified by ‘密码’;赋予权限:grant 权限列表 on 数据库 to ‘用户名’@’访问主机’ ;(修改权限时在后面加with grant option)mysql -u root -pselect user,host,authentication_string from mysql.user;use mysql;update user set host='%' where user='root';GRANT .