mysql 常用命令

记录下mysql 常用命令,方便查阅。

host 授权

1
2
3
4
5
-- 通配符设置网段
grant all privileges on <db_name>.* to root@'10.249.149.%' identified by '<pwd>';

grant all privileges on *.* to root@'10.95.54.226' identified by 'ZAQ!2wsx';
flush privileges;