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). |