How to use credentials from assets to connect to Database?

Hi travineei, once again I appreciate your help. The reason I did not do that already is because I heard turning the password into a simple string will create security issues. Is there another way or is this the only way to do it?