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

Plugin failed to access the database #352

Open
Deadfalt999 opened this issue Mar 23, 2023 · 2 comments
Open

Plugin failed to access the database #352

Deadfalt999 opened this issue Mar 23, 2023 · 2 comments

Comments

@Deadfalt999
Copy link

  • PLUGIN VERSION = 2.0.4
  • GLPI 10.0.6

I've been trying to connect to my ocsng database via the OCSNG plugin and the plugin returns to me that it failed to connect to the database.

My current setup is two Virtual Machines running AlmaLinux 9.1 server (no gui). One running GLPI and another running OCSNG, both are on the same network

I went into the php-errors.log of GLPI and it returns this detailed Warning:

[2023-03-23 08:08:59] glpiphplog.WARNING: *** PHP Warning (2): mysqli::real_connect(): (HY000/2002): Permission denied in /var/www/html/glpi/plugins/ocsinventoryng/inc/dbocs.class.php at line 97
Backtrace :
plugins/ocsinventoryng/inc/dbocs.class.php:97 mysqli->real_connect()
plugins/ocsinventoryng/inc/dbocs.class.php:55 PluginOcsinventoryngDBocs->connect()
...ins/ocsinventoryng/inc/ocsdbclient.class.php:54 PluginOcsinventoryngDBocs->__construct()
...ins/ocsinventoryng/inc/ocsserver.class.php:1926 PluginOcsinventoryngOcsDbClient->__construct()
...ins/ocsinventoryng/inc/ocsserver.class.php:1905 PluginOcsinventoryngOcsServer::getDBocs()
...ins/ocsinventoryng/inc/snmpocslink.class.php:65 PluginOcsinventoryngOcsServer::checkOCSconnection()
src/CommonGLPI.php:382 PluginOcsinventoryngSnmpOcslink->getTabNameForItem()
plugins/ocsinventoryng/inc/ocsserver.class.php:146 CommonGLPI->addStandardTab()
src/CommonGLPI.php:332 PluginOcsinventoryngOcsServer->defineTabs()
src/Toolbox.php:3559 CommonGLPI->defineAllTabs()
ajax/updatecurrenttab.php:46 Toolbox::getAvailablesTabs()

@dasilvaemerson
Copy link

dasilvaemerson commented Apr 27, 2023

Same problem here.
Did you find a solution for the issue?

@cborivant
Copy link

Same problem here. The only solutions we found either to set a simple password for the user you want to use. That is without any special character. Or you can set the password directly in the code.

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

3 participants