MySQL four communication protocols (all the sockets on Linux that are locally connected are TCP)
When MySQL is connected, when using-h127.0.0.1, the connection protocol under Linux and UNIX is the socket protocol, and Windows is the memory protocol.
such as: [[email protected] ~]# mysql-uandy-pandy-h127.0.0.1
When connecting to MySQL, use the TCP/IP protocol when using non--h127.0.0.1.
such as: [[email protected] ~]# Mysql-uandy-pandy
The following is a detailed description of the different communication protocols used to interact with MySQL server:
1.TCP/IP protocol
The > protocol (Transmission Control Protocol)/Internet Protocol (Internet Protocol) is a set of communication protocols that are used to connect hosts on the Internet. TCP/IP was first used for the UNIX operating system to establish Internet communication. Now it has become a de facto standard for network data transmission. Even those network operating systems that have their own communication protocols, such as NetWare, support the TCP/IP protocol.
2. Unix Socket Protocol
> In the Computer World, a socket is a form of internal process communication that is used to form a two-way communication connection between processes on the same host (a physical file on the local system).
3. Share Memory Protocol
> An effective way to transfer data between programs. A program creates a memory area to provide access to other allowed processes. Windows explicit "Passive" connection mode can only work on (Windows system) hosts.
4. NT Pipeline
> This named pipe design prefers client-server communication, which is more like sockets: In addition to the usual read and write operations, Windows Named Pipes supports explicit "passive" passive connection mode for server applications. Run only in a separate (Windows platform) host.
MySQL Communication protocol