Database name and host name

Using a PHP or Perl script that connects to a MySQL database? You'll need to specify a database name and host name.

Database name

It's best to create a separate database for every script or third-party application you use. That way, if one database ever becomes corrupt, it doesn't affect multiple scripts or applications.

Learn how to create a database.

 Don't use the database name "mysql" – This database is used to administer your MySQL database service.

Host name

Your database host name is "mysql".

 Important – Many third-party applications use "localhost" as the default host name. You'll need to change the host name to "mysql", or your applications won't work.

Thank you! Your feedback has successfully been submitted.

Please tell us why you didn't find this helpful.

Send Feedback