You need to create a root password and other users. insert into mysql.user set Host='localhost', User='<whatever userid you want>', Password=PASSWORD('<whatever password you want>'), Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', Index_priv='Y', Alter_priv='Y', Show_db_priv='Y', Super_priv='Y', Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', Create_user_priv='Y', ssl_type='', ssl_cipher='', x509_issuer='', x509_subject=''; flush privileges;
Adjust all privileges accordingly. Is you MySQL properly installed ??? Can you login to mysql client as root from your localhost ??? ----- Original Message ----- From: "David Blomstrom" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Friday, March 23, 2007 11:42:28 AM (GMT-0500) Auto-Detected Subject: Need Database Connection Sans Password How would you write a database connection for a database on which you haven't yet established a username or password? None of the following work: $link = mysql_connect ("localhost" , "root" , "") or die(mysql_error()); mysql_select_db ("test", $link) or die(mysql_error()); $link = mysql_connect ("localhost" , "root") or die(mysql_error()); mysql_select_db ("test", $link) or die(mysql_error()); $link = mysql_connect ("localhost") or die(mysql_error()); mysql_select_db ("test", $link) or die(mysql_error()); Thanks. ____________________________________________________________________________________ No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]