ocsinventoryng
ocsinventoryng copied to clipboard
Connection to the database failed
Hi, I have problem setting up connection to OCS DB in GLPI OCS extention. Both OSC and GLPI are installed on same VM using Apache and MariaDB. User "ocs_user" was used in OSC installation without problems so it have proper privilages to osc database. I can connect to osc DB using osc_user from within linux server and remotly. In host field I have tried "localhost" , 127.0.0.1 , and IP adress with http, https and without it. Also this is fresh installation of GLPI server
This is the error massage from GLPI debug mode: PHP Warning (2): mysqli::real_connect(): (HY000/1045): Access denied for user 'ocs_user'@'localhost' (using password: NO) in /var/www/html/glpi/src/DBmysql.php at line 247
Same massage is observed in DB errorlog: Access denied for user 'ocs_user'@'localhost' (using password: NO)
So far i tested reinstallig extension, reinstaling GLPI, creating new DB user with basic password using only letters and making sure is has full provilages to osc database.
Second account for connection testing
- The version of the plugin 2.0.0-rc2
- The version of your GLPI 10.0.0-rc2
Please test with master version ? https://github.com/pluginsGLPI/ocsinventoryng/archive/refs/heads/master.zip
Same
You tried to enter your password again ?
I just wanna point out that OSC Server And GLPI server are located in the same Vm using same Apache and same DB instace. OCS server can connect to ocs database without problems so i assume databes, databas user and privilages are setup right and still in OSCplugin setup i cannot connect to ocs database using same DB user that is working in OCS server. Password was "cleared" multiple times and each time it was copied from keepas, no option for misspeling
Try to connect it with shell before ?
Try to enter your password again ? after install master version
ocs database now has two users with full privilages, i can connect with both users to ocs database using mysql -u -p within ubuntu server that databes is installed, also i can can connect to ocs database with bot acc from my windows host using sqlmanagmentstudio. One of those users us used in OCS server that is currently running. All password was created and pasted using keepass. I cleared password after installing master version, saved then entered password once again and saved, multible times with same result.
Have You tried this solution?
https://github.com/pluginsGLPI/ocsinventoryng/issues/312
Hi,
For me it was already set to encrypt
Is there any file that i can check if password im entering in gui is stored correctly in config files? Also i wanna point out that after adding skip-grand-tables in 50-server.cnf osc extension started to work but this is not a solution, it opens full access to all databeses for all connection, it was done just for test
Any more ideas? If You need more information i can provide any log, config etc just ask
Problem is still not solved. I'll appreciate any help
Changing MariaDB to MySQL or postgresql is worth testing?
I got exactly the same issue with :
- GLPI version : 10.0.0-rc3
- OCS Inventory NG version : 2.0.0-rc2
- MariaDB server bersion : 10.5.15-MariaDB-0+deb11u1 Debian 11
- PHP version : 7.4.28
Same here,
- GLPI version : 10.0.0- final release
- OCS Inventory NG version : 2.0.0-rc2
- mysql 5.7
- PHP version : 7.4
Frederico Gendorf
On Tue, Apr 12, 2022 at 11:19 AM Nathanaël Renaud @.***> wrote:
I got exactly the same issue with :
- GLPI version : 10.0.0-rc3
- OCS Inventory NG version : 2.0.0-rc2
- MariaDB server bersion : 10.5.15-MariaDB-0+deb11u1 Debian 11
- PHP version : 7.4.28
— Reply to this email directly, view it on GitHub https://github.com/pluginsGLPI/ocsinventoryng/issues/318#issuecomment-1096791932, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSWPYD3AVCJ3S7BJ7KMU2LVEWA5RANCNFSM5R6Y3T7Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
try new version plugin 2.0.0 (final release). for me it works fine and syncs
Problem is still not solved. I'll appreciate any help
I found a solution that worked for me!
The problem was that my db user password had special characters, I just created another user to access the db with simple password and it worked!