I would like to know if it is secure to save the username, password, server etc. in the php.ini file so when I connect to the MySQL server I don't have to always put the parameters?
Also, can this information (saved in the php.ini) be viewed or retrieve by any kind of methods (like phpinfo() or something like that)?
As long as you make sure the ini file is outside the DOCUMENT_ROOT and not world-readable, it's no less secure than any other method.