Mysql 相关

开启mysql服务

mysql --install

net start mysql

开启远程服务

use mydql;
select user, host from user;
grant all privileges  on *.* to root@'%' identified by "password";

用户命令

// 创建用户
create user 'name'@'localhost' identified by 'password';

// 发配权限
grant [columns] on db.* to 'name'@'localhost';

// 回收权限
revoke [privileges] on db.* from 'name'@'localhost';

你可能感兴趣的:(Mysql 相关)