hostname - sendmail - mysql
Hello everyone.
I have a RH9 server that is being used as a web server for several php/mysql apps. I recently had to setup the sendmail function in order for certain scripts to be able to send update notification emails via web based scripts as my php.ini is setup to use sendmail vs. smtp
The server has been running well for a while now but the hostname was the default localhost.localdomain in the hosts file and now I need it set to a valid fqdn in order for sendmail to work properly. This seems like no biggie but when I altered my /etc/hosts to give me a good hostname according to sendmail I noticed that my sites could not connect to their respective mysql databases as they were setup to connect as username@localhost and now my hostname is no longer localhost. So my question is ....how do I setup RH9 with a valid hostname so that sendmail can send properly without hosing up my mysql database connections?
It would seem like I would simply need to edit the db connection scripts to use mysqlusername@newhostname but I was hoping I could change the server's hostname to whatever and then set the mysqld to use server name of localhost even though the server's hostname is example.exampledomain.com
Any suggestions are appreciated.
|