If you are using a PHP or Perl script that connects to a MySQL database, you may need to specify your database name and database host name.
Database NameHost Name
Your database host name is always mysql.
Important: Many scripts will use the default host name localhost. Please be aware that when using third-party scripts, you will need to change the host name from localhost to mysql, or your scripts will not function.
To learn more about MySQL, please visit the MySQL web site or browse books about MySQL.