Snmp extend mysql password issue


just a quick question:
if i want to put mysql extend in my librenms i have to do the following:
create mysql.cnf and enter

<?php $mysql_user = 'root'; $mysql_pass = 'toor'; $mysql_host = 'localhost'; $mysql_port = 3306; if i do that then that would be a security issue: you have on your server in clear the password of your mysql database (root as well). can you encrypt it somehow? or how can i make that this is not a security issue anymore?

is there no way to encrypt this file somhow? so it could be safer?