RE: [PHP-DB] MySQL Connect Problem

From: Date: Wed, 16 May 2001 17:04:21 +0000
Subject: RE: [PHP-DB] MySQL Connect Problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9364@lists.php.net to get a copy of this message
Yes it is running. I don't need to use a password when running from the command line but I am when connecting through PHP. This is exactly how I did it on my Win98 machine but it isn't working with W2k. Jeff Oien > Well the mysql tool doesn't need any authentication usually when you first > set it up. Is the winmysqladmin tool running in your system tray? You should > see a stop light with the green light lighted up. > > Jonathan > > 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:jeff@webdesigns1.com] > > > 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: php-db-unsubscribe@lists.php.net > > > > > For additional commands, e-mail: php-db-help@lists.php.net > > > > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > > > > > > > -- > > > PHP Database Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-db-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#9364) next »