Can I set my database hostname as ‘localhost’? with Stafford Hosts

Can I set my database hostname as ‘localhost’?

No, you would need to set the database hostname as the server that it’s on at Stafford Hosts servers.

You can find this by going to the MySQL Databases icon within your package. The hostname you’ll need to use will be something similar to ‘shareddb1b.hosting.stackcp.net’ although it’s likely the database name on your package will be different.

databasearea

‘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.

It’s different here at Stafford Hosts as we split all services and have a strict ‘one server, one rule’ policy, which enables us to offer more resiliant packages.