Memcached Connection
# Memcached Connection
We can connect to the Memcached service using the telnet command by specifying the host IP and port.
### Syntax
telnet HOST PORT
The **HOST** and **PORT** in the command are the IP and port where the Memcached service is running.
### Example
The following example demonstrates how to connect to the Memcached service and execute simple set and get commands.
In this example, the Memcached service is running on host 127.0.0.1 (localhost) and port 11211.
telnet 127.0.0.1 11211Trying 127.0.0.1...Connected to 127.0.0.1.Escape character is '^]'.set foo 0 0 3 bar STOREDget fooVALUE foo 0 3barENDquit
* * *
YouTip