Hello
What O.S are you using? Windows? Linux?
Might help if we knew which version ( win9x, redhat linux, what have you )
Regardless of that, you should have assigned a root password for MySQL directly after installation. MySQL will not let unauthorized persons to view and change your stored information (unless of course you have no password set up). So you need to let MySQL know who is authorized and who is not.
When you first installed MySQL it's preconfigured with a user named "root" who has access to do ... everything, even w/o a password.
What you should if, if you haven't already is assign a password to the root user.. this is important!
To set a root password; type this command in the bin directory of your MySQL installation
mysqladmin -u root password "newPassWord"
Now to make sure that registered, type this: you should be promted with an error msg saying access was denied; that means your password has taken effect..
mysqladmin -u root reload
Now to try out the password you just created, ask mysql to tell you it's status
mysqladmin -u root -p status
You'll be prompted to enter your password. once you enter it you should see some info about the server & it's status.
If you already did all of this through your MySQL client program, and the password works there, but not in your PHP code.. i'm unsure of your problem.
Hope this helps.
[edit]
As for warnings go, you can supress them with an "@" symbol before the function you're using.. I.E
@mysql_connect($host,$user,$pass) or die ("Cannot connect to $host " . mysql_error() . "");
[/edit]