For configuring PHP, Perl or Ruby scripts the MySQL Hostname you should use to connect to the MySQL server is “localhost”.
You will also need to make the corresponding database and user to connect to your Database.
Note : Using the Servers Actual Hostname instead of “localhost” results in it what we’d like to term as a “redundant loop” causing data to be sent out to the internet instead of being processes and transmitted locally. Additional configuration will also be required to provide access to “Guest/Internet/Anonymous” Users. On top of this redundant loop and hassle of creating another User Account, using the Servers Actual Hostname will result in slower results than using “localhost”; not to mention it uses your bandwidth !
So take it from us, simply use “localhost” if you’re setting up a CMS/PHP Script manually.
