MySQL_Narb Posted June 25, 2013 Share Posted June 25, 2013 Whenever I create my scripts, it's easy enough to just put in "localhost."; however, how do I obtain the actual host name of the MySQL database for third-party connections? Quote Link to comment https://forums.phpfreaks.com/topic/279532-how-can-i-get-the-mysql-host/ Share on other sites More sharing options...
neverforget98 Posted June 25, 2013 Share Posted June 25, 2013 It should usually be the server address. For example "server.domain.com" I don't believe you need to put a port unless it isn't the default port. Quote Link to comment https://forums.phpfreaks.com/topic/279532-how-can-i-get-the-mysql-host/#findComment-1437729 Share on other sites More sharing options...
mac_gyver Posted June 25, 2013 Share Posted June 25, 2013 the database management tool your web host provides for you to create database users/passwords/databases should list your database hostname somewhere on the page or your host may have a FAQ section that lists the information. Quote Link to comment https://forums.phpfreaks.com/topic/279532-how-can-i-get-the-mysql-host/#findComment-1437763 Share on other sites More sharing options...
Irate Posted June 25, 2013 Share Posted June 25, 2013 The hosting site I use provides a cPanel with MySQL administration and upon entering phpMyAdmin and/or MySQL for the first time, you're prompted to enter a username wherein a new message appears with the account details. It is even strictly prohibited to use localhost on the site (admittedly, it's a free site so I don't expect much, but it's working fine). Quote Link to comment https://forums.phpfreaks.com/topic/279532-how-can-i-get-the-mysql-host/#findComment-1437777 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.