docker跑tinydns

docker pull jbanetwork/tinydns

假设在/etc/tinydnsdocker/目录下存在data文件是解析文件

docker run -it –rm -v /etc/tinydnsdocker:/opt/tinydns jbanetwork/tinydns:latest tinydns-data
docker stop tinydns
docker rm tinydns
docker run -d –read-only -p 53:53/udp –name tinydns –restart=always -v /etc/tinydnsdocker:/opt/tinydns jbanetwork/tinydns:latest

mysql用户创建,授权,取回,删除

1)create user ‘user1’@’%’ identified by ‘password’;
2) grant all privileges on dbname.* to ‘user1’@’%’;
查看 show grants for ‘user1’;
3) revoke all privileges on dbname.* from ‘user1’@’%’;
查看 show grants for ‘user1’;
4) drop user ‘user1’@’%’

简化的方式是:

1)grant all privileges on ssapi.* to zhangsan@’%’ identified by ‘zhangsanpassword’;
2) drop user ‘zhangsan’;