redis and MySQL server simple solution for remote connection

A problem Overview

    mysql and redis are not allowed default remote access, remote login must want to set it. It must first firewall must open the corresponding port, which is the MySQL 3306 and 6379 redis

 Can tcping command (need to download) the windows test

  

 

Two mysql problem

Generally not set this too is wrong: Host is not allowed to connect to this MySQL server

Only need three operations on the server side:

1. Use the root account to log mysql, mysql database use: mysql -u root -p; use mysql;

2. Performupdate user set host = '%' where user = 'root';

3. Refresh settings: FLUSH PRIVILEGES;

 

Three redis problem

 Use jedis try to connect:

 

 According to the Internet bigwigs steps, I was solved:

1. Find redis.conf   

   Comment out this line, the configuration is only allowed to access the machine redis

   Set to no

 

2. Start redis, look no ps -ef redis started before you start | grep redis have to kill off

 Start here does not work properly noticed warning, that is not specified configuration file, use the default configuration files, so the earlier configuration files, move to redis-server easy to operate, then ./redis-server redis.conf can

 

Guess you like

Origin www.cnblogs.com/caijiwdq/p/10956971.html