I've never used php.ini to store mysql user info and password. php.ini is not accessible uless you have php setup in the webroot so that should be secure in itself. If you plan on sharing the box with other users that have admin access, not a good idea, then it would be a good idea to encrypt it.
I have never done it so I can't help with this.