I change password for ocs user:
ALTER USER 'userName'@'localhost' IDENTIFIED BY 'New-Password-Here';
FLUSH PRIVILEGES;
and it's works!
The new password is different from the root password.
Changing the password to the default: "ocs" solves the problem. When I changed the password to one that is not default, the problem occurs.
I think that starting the agent does not use the z-.....conf and zz-....conf files because the agent works when the username and password are different in the configuration files and different in the database.
database:
- ocs, ocsuser
z-ocsinventory-server.conf
- ocsuser
zz-ocsinventory-restapi.conf
- ocsuser
When the ocs user - for the database has a default password (ocs) the agent works. When I change the password of the ocs user in the database, the agent does not work.
I do not know why this is happening.