- 允许远程访问
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ip' IDENTIFIED BY 'qa@baifendian' WITH GRANT OPTION;
字段解释:
*.*:可访问所有数据库,可指定数据库;
'root':登陆用户名;
'%':任意IP可登陆;
password:为个人数据库登陆密码;
- 查看用户
select user , host from table;
- 删除用户
drop user 用户名@'%';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ip' IDENTIFIED BY 'qa@baifendian' WITH GRANT OPTION;
字段解释:
*.*:可访问所有数据库,可指定数据库;
'root':登陆用户名;
'%':任意IP可登陆;
password:为个人数据库登陆密码;
select user , host from table;
drop user 用户名@'%';
本文标题:mysql基本操作
本文链接:https://www.haomeiwen.com/subject/orhhlqtx.html
网友评论