Used Prompt in Win2k. Moved to the apache/mysql/bin directory
and typed mysql. 
Jeff Oien

> You said you could connect through the command-line. How did you do that?
> 
> Jonathan
> 
> Here is sample code:
> <?
> $connection = @mysql_connect("localhost", "jeff", "*****")
>       or die("Couldn't connect.");
> if ($connection) {
>       $msg = "success!";
> }
> ?>
> 
> This is on my machine only used by me. I also tried connecting to 
> IP address and 127.0.0.1 and it still won't work. Thanks.
> Jeff Oien
> 
> > 1. Can you set up a simple connection for us to test out? Allow people
> from
> > any host (%) to connect. 
> > 2. Try connecting to your own IP address or host name instead of
> localhost.
> > They SHOULD mean the same thing, but I've been able to connect to IP
> > addresses and not localhost's before when dealing with Windows 2k and
> mySQL.
> > It's almost as if my install of mySQL had set up its own name of something
> > else. Very weird, but its worth a shot.
> > 
> > -----Original Message-----
> > From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 15, 2001 8:24 PM
> > To: PHP-DB
> > Subject: RE: [PHP-DB] MySQL Connect Problem
> > 
> > 
> > Yes they are.
> > Jeff
> > 
> > > Is the MySQL and Apache running on the same machine?
> > > 
> > > Jeff Oien wrote:
> > > 
> > > > I have MySQL on a new Win2000 install and can't connect to it using
> PHP.
> > > > I am able to connect using the command line. I'm not sure what the
> next
> > > > step is to troubleshoot. I've checked the username and password in the
> > > > .ini file using WinMySQLAdmin. I'm using Apache which is working fine
> > > > otherwise. Typical code:
> > > >
> > > > <?
> > > > $connection = @mysql_connect("localhost", "jeff", "*****")
> > > >         or die("Couldn't connect.");
> > > > if ($connection) {
> > > >         $msg = "success!";
> > > > }
> > > > ?>
> > > >
> > > > Thanks.
> > > > Jeff Oien
> > > >
> > > > --
> > > > PHP Database Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > 
> > 
> > -- 
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to