Connection failed: No such file or directory

(3 posts) (2 voices)
  1. Sam, Member

    After going through the install process successfully, I get the message "Connection failed: No such file or directory"

  2. Sam, Member

    Solved...

    The config file had not updated automatically

  3. myDBR Team, Key Master

    When you have a connection problem with "No such file or directory" error message. It means that you are trying to connect to the database via socket (a good option when PHP and database are running on same machine) and PHP cannot find the socket file. The file definition can be found in php.ini, where you have an entry like this:

    mysqli.default_socket =/tmp/mysql.sock

    You will find the socket file being used with command:

    mysqld --verbose --help|grep ^socket

    If you connect to the database via TCP (like 127.0.0.1) then the socket file is not being used. But as said, when PHP and database are running on same machine, you better use the socket (use 'localhost' as hostname).

    --
    myDBR Team


Reply

You must log in to post.