3

Hi, I want to pass the username and password to connect to localhost where I have deployed memcached.

Here is my code.

import java.io.IOException;
import java.net.InetSocketAddress;

import net.spy.memcached.MemcachedClient;

public class MemCaheConnection {

    public void ConnectMemCaheConnection() throws IOException{

        MemcachedClient c = new MemcachedClient(new InetSocketAddress("localhost", 11211));
        c.flush();
    }
}

Can anyone help?

Nicholas
  • 2,147
  • 3
  • 23
  • 31
Zain
  • 5,391
  • 11
  • 34
  • 34

1 Answers1

0

without explicit use of http://code.google.com/p/memcached/wiki/SASLAuthProtocol there is no need for username+password, did you check the service is running on port 11211?

herrhansen
  • 2,413
  • 1
  • 14
  • 15