On shared hosting your MySQL hostname is almost always localhost: your WordPress install, PHP application, or any script running on your own hosting account connects to the database on the same server, so localhost is correct and it's also what any install wizard (including the WordPress installer) will default to.
You only need something other than localhost if you're connecting from outside your hosting account, for example a local dev machine, a separate server, or a desktop database client. In that case you need remote database access settings and your account's actual server hostname, not localhost.
Where to find your database credentials
Log in to portal.flashcloud.com, open your hosting service, and click the MySQL Databases tile. New databases and users are created in cPanel's Manage My Databases or Database Wizard tools (reached via one-click cPanel login from the portal).
For your wp-config.php file or any application config, the four values you need are:
DB_HOST:localhostDB_NAME: the database name shown on the MySQL Databases tileDB_USER: the database user shown on the MySQL Databases tileDB_PASSWORD: set when you created the database user
If you're not sure which database a WordPress site is using, check the existing wp-config.php in File Manager before creating a new one.
Connecting to phpMyAdmin
You don't need a hostname at all for this. Use the one-click phpMyAdmin login from the portal's Services page and it opens already authenticated against the right server. This is a fast way to browse tables, run a query, or export a database without touching connection details manually.
Connecting remotely (local dev, external app, or a desktop client)
If you're connecting from a machine that isn't your hosting account, for instance MySQL Workbench, TablePlus, or a Node/Python app running elsewhere, you need three things:
- A remote-access entry for your IP address, added in cPanel's Remote Database Access tool. Without this, the server will refuse the connection no matter how correct your credentials are.
- Your account's actual server hostname (not
localhost). Open a support ticket if you're not sure what it is. - Port
3306unless your client defaults to it already.
A quick way to sanity check the hostname from a terminal: ping yourserverhostname resolves it to an IP, and mysql -h yourserverhostname -u dbuser -p tests the actual connection. If the connection times out, the remote-access entry is the first thing to check, not the hostname itself.
Why "localhost" trips people up
It looks wrong because you're managing the site from a browser on your own computer, so it's natural to assume the database needs your computer's address or the site's domain name. But localhost refers to the server your database actually lives on, which is also where your PHP code runs. The application and the database are on the same machine, so they talk to each other internally without ever going out to the public internet. That's also why it's faster and more secure than a remote connection: no external network hop, no need to open the database port publicly.
When to contact support
If remote database access is configured correctly and you're still getting connection refused or access denied errors, or you're not sure whether a given app requires a remote connection at all, open a ticket from Support in the portal. Include the exact error message and whether you're connecting from your own computer or from another server.