赞
踩
sql> use mysql;
#mysql 5 版本示例 ip/网段参考下面配置
sql> CREATE USER 'root'@'ip/网段' IDENTIFIED BY 'password';
sql> grant all privileges on *.* to 'root'@'ip/网段' identified by 'password';
#mysql 8 版本示例
sql> CREATE USER 'root'@'10.20.6.%' IDENTIFIED WITH mysql_native_password BY 'password';
sql> grant all privileges on *.* to 'root'@'10.20.6.%';
#刷新权限
sql> flush privileges;
#找到sqlnet.ora文件
[root@~]cd $ORACLE_HOME/12c/network/admin
#修改路径执行添加把名单网段
echo "tcp.validnode_checking=yes" >> /inspur/app/oracle/12c/network/admin/sqlnet.ora
echo "tcp.invited_nodes=(10.20.8.0/24,127.0.0.1,10.20.7.0/24,10.20.6.0/24)" >> /inspur/app/oracle/12c/network/admin/sqlnet.ora
[root@~]su - oracle
#重启监听
[root@~]lsnrctl stop
[root@~]lsnrctl start
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。