Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

How to change mysql password [closed]

Hi,

after i spend much time to get ocsdiscovery orking, i try to change the password für the mysql user

I followed the Instructions in

https://wiki.ocsinventory-ng.org/09.Extras/Secure-your-OCS-Inventory-NG-Server/

(only new password for ocs user)

Bit id didnt work.

In the Web frontend i get the following error:

ERROR: MySql connection problem 1045

Access denied for user 'ocs'@'localhost' (using password: YES)

ERROR: MySql connection problem 1045

Access denied for user 'ocs'@'localhost' (using password: YES)

It seems that i need to change some more files as shown in the Documentation.

After greping the files in /usr/share/ocsinventory-reports/ and /etc/httpd/conf.d/ for the database name, i found the following

 files, that contains the mysql password:

/usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

/usr/share/ocsinventory-reports/ocsreports/ipdiscover-util.pl

/etc/httpd/conf.d/ocsinventory-server.conf

/etc/httpd/conf.d/ocsinventory-restapi.conf

After changing the Files and restarting mariadb/httpd it is not working.

Is there any way to perform that (simple) task - changing the mySQL-Password?

Thanks!
closed with the note: OK i stopped playing around that.   Thanks
in OCS Inventory NG server for Unix by (260 points)
closed by

3 Answers

0 votes

1 - in SSH, connect as root

2 - mysql -u root

> If done, you must see "MariaDB [(none)]>"

3 - ALTER USER 'user-name'@'localhost' IDENTIFIED BY 'NEW_USER_PASSWORD';

4 - FLUSH PRIVILEGES;

5 - QUIT;

To verifiy the new password :

mysql -u user-name -h localhost -p

> You will be prompted to enter the new user password...

by (1.2k points)
0 votes
Hi,

thanks for the answer.

Of course i changed the password for the mysql user and verified before i changed the configuration files

Unfortunately it is still not working.

Any Idea?

Thanks

Marcus
by (260 points)
0 votes
OK i stopped playing around that.
Thanks
by (260 points)
 
Powered by Question2Answer
...