A)安装及配置

  1. 下载mariadb:

    yum -y install mariadb-server mariadb
  2. 开启mariadb服务:
    systemctl start mariadb.service
  3. 重启:systemctl restart  mariadb.service
  4. 无密码登录mariadb:
    mysql
  5. 查看用户表:
    select * from mysql.user;
  6. 修改密码和授权: grant all on *.* to 'root'@'%' identified by '123456' with grant option;update mysql.user set host = '%' where user = 'root';select host, user from user;flush privileges;
  7. 密码登录: mysql -u root -p
  8. 设置开机启动:systemctl enable mariadb.service

B)防火墙

  1. 停止防火墙::systemctl stop firewalld
  2. 安装iptables-services:yum install iptables-services
  3. 设置开机启动:

    systemctl enable iptables

              systemctl stop iptables

    systemctl start iptables
    systemctl restart iptables
    systemctl reload iptables

   4.保存设置:

    service iptables save

  5.开放某个端口 在/etc/sysconfig/iptables里添加:

  /sbin/iptables -A INPUT -p tcp --dport 3306 -j ACCEPT 或者

查看防火墙状态:  
service iptables status

永久性生效,重启后不会复原  
开启:  
chkconfig iptables on  
关闭:  
chkconfig iptables off

2.即时生效,重启后复原  
开启:  
service iptables start  
关闭:  
service iptables stop

参考

https://www.cnblogs.com/star91/p/4980024.html

https://blog.csdn.net/qq_40342287/article/details/82428048

http://blog.51cto.com/12173069/2119307

https://www.cnblogs.com/wujunbin/p/7465538.html

https://blog.csdn.net/c233728461/article/details/52679558/

https://blog.csdn.net/qq_37928350/article/details/78830896

最新文章

  1. Oracle---------sql 中取值两列中值最大的一列
  2. Servlet学习一
  3. C#如何实现一个简单的流程图设计器
  4. Python字符串的编码与解码(encode与decode)
  5. ClipDrawable 实现图片渐变现实
  6. 【Networking】flannel,pipework,weave,udp,vxlan,ovs等资料
  7. ABAP遇到的问题——1
  8. php + mysql 分布式事务(转)
  9. js中的闭包之我理解
  10. 关于Struts2的Validator的配置找不到DTD
  11. Python学习笔记一--字符串的使用
  12. 技术贴:asp.net实现唯一账户在线 禁止同一帐号同时在线 asp.net实现您的帐号在别处登录,您已被迫下线!
  13. 了解各种AA特性
  14. Angular JS的正确打开姿势——简单实用(下)
  15. spring boot RESTFul API拦截 以及Filter和interceptor 、Aspect区别
  16. Keras入门(一)搭建深度神经网络(DNN)解决多分类问题
  17. Codeforces Round #524 (Div. 2) C. Masha and two friends 几何:判断矩形是否相交以及相交矩形坐标
  18. 多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法
  19. vue深入了解组件——处理边界情况
  20. Codeforces 677C. Coloring Trees dp

热门文章

  1. STM32的固件升级(RTT
  2. springboot+redis实现缓存数据
  3. pycharm安装与使用
  4. Java入门系列-12-成员方法
  5. vue(2.0)+vue-router(2.0)+vuex(2.0)实战
  6. bzoj 2164: 采矿
  7. 架构实战项目心得(十一):基于spring-security-oauth2的mysql数据表设计
  8. awk中引用变量使用单引号''
  9. js扩展
  10. BEM样式使用规范