Change password of mysql and redis

for security, i need to change the default for mysql and redis. But as a freshman, I don’t know which config file need to change either. Can anyone tell me pls.

how php call pbx? where is the config file? I only add the file requirepass to redis.