Closed alkar1 closed 7 years ago
Can you connect from the CLI using the provided credentials?
Yes , `root@rex:/var/log# psql -h 127.0.0.1 -d sqlgrey -U sqlgrey Hasło użytkownika sqlgrey: psql (9.4.10) Połączenie SSL (protokół: TLSv1.2, szyfrowanie: ECDHE-RSA-AES256-GCM-SHA384, bity: 256, kompresja wyłączone) Wpisz "help" by uzyskać pomoc.
sqlgrey=> sqlgrey=> \dt Lista relacji Schemat | Nazwa | Typ | Właściciel ---------+---------------+--------+------------ public | config | tabela | sqlgrey public | connect | tabela | sqlgrey public | domain_awl | tabela | sqlgrey public | from_awl | tabela | sqlgrey public | optin_domain | tabela | sqlgrey public | optin_email | tabela | sqlgrey public | optout_domain | tabela | sqlgrey public | optout_email | tabela | sqlgrey (8 wierszy)
sqlgrey=>
`
I changed sqlgrey database type from postgres to mysql , and all works fine. Thread to close.
This is a bug. :( If SQLgrey uses a PostgreSQL database you most likely won't be right with specifying mysql. I will release an updated version later.
Please test latest version.
My .env : `
Database for SQLgreyGUI
If you want to use a single database for both SQLgreyGUI and SQLgrey use only this config block
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=sqlgrey DB_USERNAME=sqlgrey DB_PASSWORD=XXX
Uncomment the following lines if SQLgrey resides in a different database
SQLGREY_DB_CONNECTION=postgresql SQLGREY_DB_HOST=127.0.0.1 SQLGREY_DB_PORT=5432 SQLGREY_DB_DATABASE=sqlgrey SQLGREY_DB_USERNAME=sqlgrey SQLGREY_DB_PASSWORD=XXX ` Log:
`[2017-07-12 11:54:33] production.ERROR: exception 'PDOException' with message 'SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (4)' in /var/www/SQLgreyGUI/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace:
0 /var/www/SQLgreyGUI/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:host=127....', 'sqlgrey', 'XXX', Array)
`