Can I set my database hostname as ‘localhost’?

No, you must to set the database hostname to the database server name.

You can find the database server name by clicking the MySQL Databases icon within your Control Panel.

The server name will be displayed before the database name, and username.

Why we don't use localhost

'localhost' generally means the MySQL databases are hosted on the same server as the websites, which is quite common in the web hosting industry, with hosts that have a 'single-server' approach where all services run from the same machine.

We are different because we split all services and have a strict 'one server, one rule' policy. 

At the data centres, web traffic, MySQL traffic and storage are all physically different machines, so 'localhost' just can't work.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

What is MS-SQL?

Microsoft SQL Server is a relational database management system (RDMS) developed by Microsoft....

How do I create a MySQL database?

You can create MySQL databases in seconds directly from your Patrick Internet Ltd control panel....

How do I create a MySQL database?

You can create MySQL databases in seconds directly from your Patrick Internet Ltd control panel....

How do I manage my Microsoft SQL database?

We recommend using SQL Server Management Studio (SSMS) for managing your Microsoft SQL...

What is MariaDB?

MariaDB is a fork of MySQL. The database structure and indexes of MariaDB are the same as...