PyCharm
 
Get PyCharm

Create a MySQL data source using unix sockets

Last modified: 14 November 2024

On Unix, you can connect to the mysqld server by using two different ways: a Unix socket file (for example, /var/run/mysqld/mysqld.sock), or by using TCP/IP (for example, 127.0.0.1:3306). A connection created with a Unix socket file is faster than TCP/IP but can only be used when connecting to a server on the same computer. When you use a Unix socket file, you can skip a hostname and port in the connection string.