There are many things that can go wrong while establishing a connection. Passwords may not match, the server may be down etc.
First make sure the mysql server is up and configured properly. Also that you are using the correct port. [3306 is the default port for Mysql 5] Make sure that your firewall is not blocking that port.
Consider using the "or die()" construct to print the error message. The "die" part will be executed if the connection fails. It will help to debug as to why the connection is failing.
mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
Some links you may like to read:
Tutorial
Die manual