I don't think this is a good idea, even if the database is just listening to localhost.
Say a malicious script gets uploaded to the machine, it will be able to dump the entire database without any need to seek out credentials.
Agree... it's better to still have credentials, but ALSO only listen locally. At least that way the credentials need to be found first!