Question

Connect my laravel to pgsql on Digital Ocean

Posted July 9, 2020 933 views
PostgreSQL

I uploaded laravel on this server and laravel is working but pgsql not working with this,

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Both are on the same server?
How is the authentication pgsql?, can you connect with some client?, maybe testing with a small php script to test the connection.

  • I have the same issue. I installed it on the digital ocean droplet and setup an outside database. I get the same issue with both.

    This is the response I get

    1 Doctrine\DBAL\Driver\PDO\Exception::new()
    /home/centos/_work/mhs-dev/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43

    2 PDOException::(“SQLSTATE[08006] [7] FATAL: password authentication failed for user "vjdnxozbwomqce”
    FATAL: no pghba.conf entry for host “137.184.10.57”, user “vjdnxozbwomqce”, database “db216s9bl09spg”, SSL off")
    /home/centos/
    work/mhs-dev/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:39

    Really trying to get this up and running as our development server with the intention of migrating the site over to digital ocean.

    • Figured it out. Needed to actually install the driver.

      sudo yum install php-pgsql
      and if you get an authorization error after that. Log into psql and change the password for postgres. That should work.