What Is the MySQL Hostname?
When configuring scripts or software that connect to MySQL on your hosting account, use the following hostname:
localhostThis applies to all applications installed on the same server as your database (WordPress, Joomla, custom PHP scripts, etc.).
If you are connecting to a remote MySQL server (for example, from a cloud vps or external application), you will need to use the server’s IP address instead of localhost. Make sure the connecting IP is allowed in cPanel’s Remote MySQL interface.