-
Notifications
You must be signed in to change notification settings - Fork 57
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
Changind DB credentials fails #80
Comments
I may have to attempt to replicate this when I get time. At the top of my head, I want to say those database env variables are only used when installing a new instance of cacti. To change an existing password you would need to edit the cacti configuration file manually, take a look at It will look something like:
|
If you can share your compose file (passwords and what not removed) I can also use that as a base to replicate :) |
Here is the docker-compose file: version: '3.5' cacti: db: volumes: cacti.env file: DB_NAME=cacti_master cacti_db.env file: MYSQL_ROOT_PASSWORD=my2ndpass Although you can simply put them all in the compose file no need to split it. If you run the compose file initially with my1stpass,then copy volumes or backup elsewhere and rerun with my2ndpass in the compose file i believe it will work but will have in fact keep the first pass. thx for your efforts! |
Also its impossible to keep the identation correct in the post, sorry about that. |
Can you explain the proper way to change our db credentials but keep the data already collected?
I tested the default docker compose succesfuly,collected data and then after backing up with your script the data i deployed a new docker-compose file with different creds to a new VM and restored.It didnt start.
Then i copied the volumes and it starts correctly,thing is although the env vars are different i found its still using the default creds from your example and thats why its getting data.
The common error is Access denied for user 'cactiuser'@'172.21.0.3' (using password: YES)
Also i tried to change from inside the cacti docker manually the creds for the root and cactiuser users in the DB.I then noticed config.php kept the old creds so i changed it there too.Ofcourse im doing docker-compose down and up -d for my changes.
Still it keeps throwing the error and wont update the spine poller results.
SPINE: Poller[Main Poller] PID[1286] FATAL: Connection Failed, Error:'1045', Message:'Access denied for user 'cactiuser'@'172.21.0.3' (using password: YES)' (Spine parent)
I made combinations with initialize_db values but no luck.
Im missing something here,maybe another file that needs changing?Could you please reproduce and present the correct order of actions we need to do to change the DB credentials but keep the data?
The text was updated successfully, but these errors were encountered: