Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One more 'Unable to Connect to DB error' #1569

Closed
Optimaximal opened this issue Jul 9, 2020 · 2 comments
Closed

One more 'Unable to Connect to DB error' #1569

Optimaximal opened this issue Jul 9, 2020 · 2 comments

Comments

@Optimaximal
Copy link

Optimaximal commented Jul 9, 2020

sysPass Version
3.1

Describe the bug
I cannot get past the MySQL stage on initial install

To Reproduce
Steps to reproduce the behavior:

  1. Set up according to https://syspass-doc.readthedocs.io/en/3.1/installing/debian9.html#installation - syspass cloned from git repo.
  2. Navigated to index.php and complete first time install
  3. Enter root or syspass detail (manually created user - hosted mode ticked) and click Install
  4. MySQL Error.

Screenshots
syspasserror

Event log
[2020-07-09 23:36:15] syspass.EXCEPTION: logger {"message":"Unable to connect to DB
#0 /var/www/syspass/lib/SP/Services/Install/MySQL.php(94): SP\Storage\Database\MySQLHandler->getConnectionSimple()
#1 /var/www/syspass/lib/SP/Services/Install/MySQL.php(72): SP\Services\Install\MySQL->connectDatabase()
#2 /var/www/syspass/lib/SP/Services/Install/Installer.php(266): SP\Services\Install\MySQL->__construct(Object(SP\Services\Install\InstallData),Object(SP\Config\ConfigData))
#3 /var/www/syspass/lib/SP/Services/Install/Installer.php(187): SP\Services\Install\Installer->setupDb()
#4 /var/www/syspass/lib/SP/Services/Install/Installer.php(99): SP\Services\Install\Installer->install()
#5 /var/www/syspass/app/modules/web/Controllers/InstallController.php(88): SP\Services\Install\Installer->run(Object(SP\Services\Install\InstallData))
#6 [internal function]: SP\Modules\Web\Controllers\InstallController->installAction()
#7 /var/www/syspass/lib/SP/Bootstrap.php(240): call_user_func_array(Array,Array)
#8 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#9 /var/www/syspass/vendor/klein/klein/src/Klein/Klein.php(886): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection$
#10 /var/www/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#11 /var/www/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#12 /var/www/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#13 /var/www/syspass/index.php(28): require(String)","caller":"N/A"}
[2020-07-09 23:36:15] syspass.EXCEPTION: logger {"message":"(P) SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
#0 /var/www/syspass/lib/SP/Storage/Database/MySQLHandler.php(174): PDO->__construct('mysql:charset=u...', 'root', 'paw9fMBVsgAcDnt...', Array)
#1 /var/www/syspass/lib/SP/Services/Install/MySQL.php(94): SP\Storage\Database\MySQLHandler->getConnectionSimple()
#2 /var/www/syspass/lib/SP/Services/Install/MySQL.php(72): SP\Services\Install\MySQL->connectDatabase()
#3 /var/www/syspass/lib/SP/Services/Install/Installer.php(266): SP\Services\Install\MySQL->__construct(Object(SP\Services\Install\InstallData), Object(SP\Config\ConfigData))
#4 /var/www/syspass/lib/SP/Services/Install/Installer.php(187): SP\Services\Install\Installer->setupDb()
#5 /var/www/syspass/lib/SP/Services/Install/Installer.php(99): SP\Services\Install\Installer->install()
#6 /var/www/syspass/app/modules/web/Controllers/InstallController.php(88): SP\Services\Install\Installer->run(Object(SP\Services\Install\InstallData))
#7 [internal function]: SP\Modules\Web\Controllers\InstallController->installAction()
#8 /var/www/syspass/lib/SP/Bootstrap.php(240): call_user_func_array(Array, Array)
#9 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request), Object(Klein\Response), Object(Klein\ServiceProvider), Object(Klein\App), Object(Klein\Klein), Object(Klein\DataCollection\RouteCollection), Array)
#10 /var/www/syspass/vendor/klein/klein/src/Klein/Klein.php(886): call_user_func(Object(Closure), Object(Klein\Request), Object(Klein\Response), Object(Klein\ServiceProvider), Object(Klein\App), Object(Klein\Klein), Object(Klein\DataCol$
#11 /var/www/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route), Object(Klein\DataCollection\RouteCollection), Array)
#12 /var/www/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#13 /var/www/syspass/lib/Base.php(75): SP\Bootstrap::run(Object(DI\Container))
#14 /var/www/syspass/index.php(28): require('/var/www/syspas...')
#15 {main}","caller":"N/A"}

Platform (please complete the following information):

  • OS: Ubuntu 18.04
  • Browser: Chrome

Additional context

  • I have successfully logged into mysql using both root and 'syspass' user via SSH and phpmyadmin. The username and password are not the issue
  • I have tried setting the user host detail to localhost & % - same issue.
  • I have tried suffixing the db server value with the port (3306)
  • Other services on the same server, including WordPress, can connect fine using the standard port
  • SELinux is not installed
  • I have edited mysqld.cnf and removed the enforced binding to localhost.
  • the error is turning up in var/log/mysql/error.log, but with no real explanation why.
@Optimaximal
Copy link
Author

Ok, in a fit of strangeness, now I am in the office this is all working. Could be a result of my working from home over the VPN. Very strange...

@l33one
Copy link

l33one commented Jul 13, 2021

Change the "syspass database server" field from localhost to syspass-db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants