googlememcached

Start memcached without SASL authentication

Disable SASL authentication

By default, memcached is configured to run with SASL authentication. This is highly recommended to secure your memcached installation.

To disable this authentication:

$ cd /opt/bitnami/memcached/scripts/
$ sudo sed -i 's/memcached -d -S/memcached -d/g' ctl.sh

Once done, restart the memcached server for the change to take effect.

$ sudo /opt/bitnami/ctlscript.sh restart

NOTE: If you see the following error it might be because you are using a Memcached client that does not support SASL authentication. You can either disable authentication as explained in this section or use a different Memcached client like the one used in the testing guide.

PHP Notice:  memcache_get(): Server 127.0.0.1 (tcp 11211, udp 0) failed with: Read failed (socket was unexpectedly closed) (0) in /home/bitnami/example.php on line 10
array(0) {
}

Enable SASL authentication

By default, memcached is configured to run with SASL authentication. This is highly recommended to secure your memcached installation.

If you have previously disabled this authentication and now want to re-enable it:

$ cd /opt/bitnami/memcached/scripts/
$ sudo sed -i 's/memcached -d/memcached -d -S/g' ctl.sh

Then, create a user:

$ sudo /opt/bitnami/common/sbin/saslpasswd2 -a memcached -c USERNAME
$ sudo chown memcached:memcached /opt/bitnami/common/etc/sasldb2

Restart the memcached server for the change to take effect.

$ sudo /opt/bitnami/ctlscript.sh restart
Last modification October 1, 2018