The (my) preferred way to keep passwords of any kind, cleartext, hashed or otherwise, from the code and logs is by using authentication domains. This way you can store the password safely in the metadata sever and never see it surface in logs or anywhere else.
Create a metadata group and define the account you use to access the database as one of its account. Assign it to a new authentication domain. Make the appropriate users and groups member of that group. Now you can do something like this:
proc sql;
connect to mysql server=xyz authdomain=sqlauthdomain;
...
quit;
If the account that runs the code is a member of that group then it will pick up the account info including the password and it will never be echoed to the log.
Alternatively, you can define such an account as one of the accounts in your own personal user metadata.
Hope this helps,
- Jan.
... View more