As stated above, the .ini file might not be more or less secure than storing it in a .php file itself. However, one thing to consider is that when using the .ini file, this setting is effectively global to any and all PHP code and websites. Using the .ini file may affect other code that you wish to use a different user for.
Overall, it's probably best security practice to NOT use an .ini file to store the password, simply because it's now open to anybody storing PHP files on your server. Also makes it a bit of a hassle if you suddenly need to give multiple sites or applications for a site different logins (for separate databases). It's not best to use one login for multiple databases, except for the root user which should only be used for administrative purposes.