pluginsGLPI / ocsinventoryng

Plugin ocsinventoryng for GLPI
GNU General Public License v2.0
68 stars 52 forks source link

Plugin failed to access the database #352

Open Deadfalt999 opened 1 year ago

Deadfalt999 commented 1 year ago

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 commented 1 year ago

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

cborivant commented 9 months ago

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.