Sorry - forgot to CC to list.

Personally I have a feeling that if you take out the :3306, your
script might just work.

I read somewhere that on unix, mysql used a unix socket whenever the
hostname was localhost. On unix localhost:something means that
something is a unix socket, when it would otherwise be a port, so I
think your system may be looking for a file named 3306(which would
just happen to be a socket.

Failing that replace localhost with 127.0.0.1

This is as well of course just a guess, and probably not a very educated one.


On 5/9/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Sat, May 7, 2005 4:56 am, Deep said:
> > Hi,
> >
> >  If you are using localhost, i dont think u need to
> > specify the port number. Localhost would be enough.
> > Also pls check the user privileges and all in the
> > database.
> >
> > ..Deep..
> >
> > --- Oscar Andersson <[EMAIL PROTECTED]>
> > wrote:
> >
> >> I have made a instal of the latest mySQL and PHP 5
> >> on my computer.
> >> I have made the following changes to my php.ini file
> >>
> >> extension=php_mysql.dll
> >> extension_dir = "c:\php\"
> >>
> >> and i have put the php_mysql. and libmysql.dll in
> >> c:\php\ and in c:\windows
> >> to
> >>
> >> Now i try this in my php-file
> >> $con = mysql_connect("localhost:3306", "buddy",
> >> "bestbuddy");
> >>
> >> I cant connect to mySQL. I dont know what is wrong.
> >> mySQL listen to port
> >> 3306. I have tried with my IP to. I get this warning
> >> Warning: mysql_connect() [function.mysql-connect]:
> >> Too many open links (0)
> >> in myfilename.php.
>
> Too many open links sounds to me like you've set up MySQL to only allow X
> connections, and you are trying to open up X+1 connection.
>
> The 0 would make me guess that X is 0.
>
> So I'd *GUESS* you have a setting in my.cnf that says to limit number of
> connections to 0, and that means you can't have any connections at all...
>
> Just a GUESS.
>
> --
> Like Music?
> http://l-i-e.com/artists.htm
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to