Home >Backend Development >PHP Tutorial >Solution to the PHP site prompt that '/var/lib/mysql/mysql.sock' does not exist
2. Modify the connection method: Specify the IP address and use tcp to connect to mysql instead of local sock.
3. Create link Add a link to mysql.sock. For example, if the actual mysql.sock is under /tmp/, type the command:
Choose any one of the above three solutions to solve the problem and complete Then restart php, nginx (or apache). |