SQLSTATE[HY000] [2002] No such file or directory php -sqlite3

hi, My problem is the following: I get this message when I want to handle a file with the “.db” extension and it tells me that it can’t find it even if it’s in the same path…
what could be the error?

Have you defined a path to your socket in the config/packages/doctrine.yaml? See the marked answer here

I think that setting localhost to fixes your initial problem, but then you are getting connection refused as the server isn’t accepting your credentials.

If you aren’t using a socket, then you need to pass a password in to your DATABASE_URL:


This problem sometimes occurs, because on Linux (unix) machines, we need to indicate unix_socket=“value”. You should find “mysql.sock” file in your local server folder and copy/paste the path as its value. e.g. on my distant Gandi server this file is called “mysqld.sock” and lives in /srv/run/mysqld/ . So, the distant .env is : DATABASE_URL="mysql://root:password@localhost/db_name?unix_socket=/srv/run/mysqld/mysqld.sock"
On my local ubuntu this file lives in /opt/lampp/var/mysql/mysql.sock . In my local .env file : DATABASE_URL="mysql://root:password@localhost/db_name?unix_socket=/opt/lampp/var/mysql/mysql.sock"
Hope, it helps someone having the same issue.

Where can I modify that file?

I’m using the repplit php server to try to create a project using that sqlite 3 extension and I haven’t seen what you’re saying or where to put it…