php/mysql connection

From: Date: Sun, 02 Feb 2003 20:15:55 +0000
Subject: php/mysql connection
Groups: php.general 
Request: Send a blank email to php-general+get-134037@lists.php.net to get a copy of this message
Newbie question and OT. Sorry. I am able to conncet to a mysql server with the following call to mysql_connect(). $connect=@mysql_connect("","",""); There are no parameters in the function call. Why can I connect if there are no parameters? However, if I give mysqladmin the password of: goodpassword and call: $connect=@mysql_connect("localhost","root","goodpassword"); I connect. But if I call: $connect=@mysql_connect("localhost","root","badpassword"); I cannot connect. Or from the command line... From the command line: C:\Windows\cd c:\mysql\bin \\enter C:\mysql\bin> mysqld-shareware --standalone \\enter C:\mysql\bin> mysql \\enter note: no password have been entered. \\ I get the: Welcome to the MySql monitor... ............................... Or... C:\Windows\cd c:\mysql\bin \\enter C:\mysql\bin> mysqld-shareware --standalone \\enter C:\mysql\bin> mysql -u root - p \\ enter Enter password goodpassword \\ I get the: Welcome to the MySql monitor... ............................ C:\Windows\cd c:\mysql\bin \\enter C:\mysql\bin> mysqld-shareware --standalone \\enter C:\mysql\bin> mysql -u root - p \\ enter Enter password badpassword \\ I do _not_ get the: Welcome to the MySql monitor... ........................ Why is this when I thought it needs a password to connect to the MySql monitor? Thanks, TR

« previous php.general (#134037) next »