For me, the question is what do you get from running it without a password?
Even if you work in a reliable environment, is it really worth using a password? While a trusted environment should not be compromised, nothing is completely secure, and by adding a password you add an extra layer of protection. Therefore, if someone violates your server, they should not automatically access the database.
For the same reason, you must encrypt / hash user passwords when they are stored in the database. If someone violates your server, they do not automatically get access to everything.
This approach is called the depth of defense.
source share