Home  >  Article  >  Backend Development  >  Why can't I connect to Alibaba Cloud's redis? Neither redis-cli nor php-redis extension can be connected.

Why can't I connect to Alibaba Cloud's redis? Neither redis-cli nor php-redis extension can be connected.

WBOY
WBOYOriginal
2016-09-24 09:15:121339browse

Direct connection from command line:

<code>redis-cli -h host -a 6379:password

</code>

php extension:

<code>$redis = new Redis();
$redis->connect(host,6379);
$res = $redis->auth(password);

都连不上,但是连127.0.0.1可以连上,而且可以用</code>

Reply content:

Direct connection from command line:

<code>redis-cli -h host -a 6379:password

</code>

php extension:

<code>$redis = new Redis();
$redis->connect(host,6379);
$res = $redis->auth(password);

都连不上,但是连127.0.0.1可以连上,而且可以用</code>

Alibaba Cloud’s Redis service does not seem to support external network access.
Reference: https://help.aliyun.com/knowl...

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn