I am connecting to my MySQL server using PHP and getting the error: Warning: mysql_connect() [function.mysql-connect]: Too many connections in file on line # Failed to connect to server: Too many connections I am using mysql_close() when I redirect or when the script stops. Why am I getting this error? Is there anyway to prevent this from happening?