windows 访问 CentOS 的防火墙及其 网关开放
1.防火墙开放端口
firewall-cmd --zone=public --add-port=8848/tcp --permanent
firewall-cmd --list-ports
开放centOS 网关,远程连接
grant all privileges on *.* to 'root'@'192.168.128.1' identified by 'root' with grant option;
开放docker容器网关,使得运行的docker连接linux数据库mysql
grant all privileges on *.* to 'root'@'172.17.0.1' identified by 'root' with grant option;
开放所有端口远程连接mysql
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
mysql赋权操作:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
- 1
flush privileges;
GRANT:赋权命令
ALL PRIVILEGES:当前用户的所有权限
ON:介词
*.*:当前用户对所有数据库和表的相应操作权限
TO:介词
‘root’@’%’:权限赋给root用户,所有ip都能连接
IDENTIFIED BY ‘123456’:连接时输入密码,密码为123456
WITH GRANT OPTION:允许级联赋权
20200901:
将GRANT语句通过代码块包起来
我只是偶尔安静下来,对过去的种种思忖一番。那些曾经的旧时光里即便有过天真愚钝,也不值得谴责。毕竟,往后的日子,还很长。不断鼓励自己,
天一亮,又是崭新的起点,又是未知的征程(上校9)
逆水行舟,不进,则退!