I am on a problem since yesterday that I can not solve.
The error appears when I want to connect to the database of a host, the error is No such file or directory
, I looked for the path of the socket file and the path is / var / run / mysqld /mysqld.sock
so I changed the file path. Locally its function the solution that I have on the net but in production no
here is the conf of the laravel .env
file
DB_Connection = mysql
DB_HOST = hXXmysqlXXX
DB_PORT = 3306
DB_DATABASE = XXX_test
DB_USERNAME = XXX_bdd
DB_PASSWORD = XXXX
'# DB_SOCKET = / tmp / mysql.sock (it's a comment)
DB_SOCKET = /var/run/mysqld/mysqld.sock
Unfortunately, this did not solve the error.
Could you help me solve the problem?
Thank you
(I have already researched the problem and did not find a solution.Excuse me for my english, it's not my mother tongue)