There is not sufficient information here to give detailed suggestions, but the first two things to check:
1. Is your firewall open between all the NiFi nodes and the DB?
2. Are your credentials correct?
- Dennis Jaheruddin
If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.