zoukankan      html  css  js  c++  java
  • 远程连接mysql和redis配置

    远程连接Redis配置流程

    • 配置流程

       
       
       
      xxxxxxxxxx
      10
       
       
      1
      【1】修改配置文件
      2
          sudo gedit /etc/redis/redis.conf
      3
          修改如下2个内容后保存退出:
      4
             # bind 127.0.0.1 ::1  把此行注释掉
      5
             protected-mode no     把默认的yes改为no
      6
      
      
      7
      【2】重启redis服务
       
       
      8
          sudo /etc/init.d/redis-server restart
      9
      
      
      10
      【3】远程连接测试(在远程机器上)
      11
          redis-cli -h IP地址
       
       

    远程连接MySQL配置流程

    • 配置流程

       
       
       
      xxxxxxxxxx
      10
       
       
       
       
      1
      【1】修改配置文件,允许远程连接
      2
          sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf
      3
          将如下行注释并保存退出:
      4
           # bind-address = 127.0.0.1
      5
      
      
      6
      【2】给用户授权
      7
          mysql -uroot -p123456
      8
          mysql> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
      9
          mysql> flush privileges;
      10
      
      
      11
      【3】重启MySQL服务
      12
          sudo /etc/init.d/mysql restart
      13
      
      
      14
      【4】远程连接测试(远程服务器上)
      15
          mysql -hIP地址 -uroot -p123456
       
       
  • 相关阅读:
    ArrayList 和 Vector 的区别
    Redis在springboot中使用,读取字符串
    初始化Mysql
    Redis 安装
    React-脚手架
    React virtual DOM explained in simple English/简单语言解释React的虚拟DOM
    数据结构
    书单(18-19)
    算法复杂度
    otrs离线部署
  • 原文地址:https://www.cnblogs.com/yongqi-wang/p/13667922.html
Copyright © 2011-2022 走看看