Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 17th, 2007, 02:29 PM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Connection

Hi all,
I am a C++ developer - new to PHP and MySql. Am using MySql on a Yahoo domain that supports MySql & PHP. Just trying the basics, but when I do the following:
<?php
// Connecting, selecting database
$link = mysql_connect('http://mydomain.com', 'myusername', 'mypassword'); ?>

it times out. Have tried substituting with the IP address, added port number - all with the same result. I expect (and hope) it is something easy.

Thanks for helping.

-Gabe
  #2 (permalink)  
Old October 17th, 2007, 04:48 PM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well it took me the entire day, but I found the answer. It was sort of staring me in the face in the Yahoo docs, too. Yahoo needs the host name to be 'mysql'. Hope this saves someone else a little time.

-Gabe


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Connection to Access Database reachsevar ASP.NET 2.0 Basics 1 November 28th, 2007 08:56 AM
Database Connection kapi.goel SQL Language 2 February 14th, 2006 07:01 PM
database connection Nitin_sharma Classic ASP Databases 1 February 8th, 2005 10:23 AM
Connection to database exdter Dreamweaver (all versions) 3 September 21st, 2004 02:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.