jjmusicpro Posted December 13, 2007 Share Posted December 13, 2007 i was curious, how i connect using a url to a db, and not saying "localhost" here is my connection files, that in use the include feature on my other pages... connect.php <?php // This is an example of config.php $dbhost = 'localhost'; $dbuser = 'xxxxx'; $dbpass = 'joxxxx'; $dbname = 'xxxx'; ?> would i just change the DBHOST to the URL? Quote Link to comment Share on other sites More sharing options...
paul2463 Posted December 13, 2007 Share Posted December 13, 2007 yes, either the ip address or the name of the DB server Quote Link to comment Share on other sites More sharing options...
jjmusicpro Posted December 13, 2007 Author Share Posted December 13, 2007 for some reason that doesnt work for me.. page just times out. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 13, 2007 Share Posted December 13, 2007 Does your mysql_connect() function call have any error checking to get it to tell you why it failed? You will need to provide more information about what your code is and what you are doing for anyone in a forum to be able to help. Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted December 13, 2007 Share Posted December 13, 2007 You also need to add a MySQL user for the remote connection. Post on the MySQL board for help setting this up. If you are on a shared server, this most likely has been locked down. PhREEEk Quote Link to comment 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.