Page 1 of 1

upgraded to MySQL 4.1 from 3.23 but...

Posted: Mon Dec 26, 2005 3:55 am
by spitfire_esquive
my PHP scripts can't seem to connect to the database anymore :( I can use MySQL using the command line but the scripts can't seem to connect.

I suspect it is because of the ports; because in the installation of 4.1 it gave me the port choices. Should the port be 80?

Also checked php.ini and this is what they have to say about the MySQL port :

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

Unfortunately I can't find where "/etc/services" is residing. Tried Control Panel > System > Advanced > Environment Variables but couldn't see that entry :(

Any help would be greatly appreciated!

Re: upgraded to MySQL 4.1 from 3.23 but...

Posted: Mon Dec 26, 2005 6:17 am
by m3mn0n
spitfire_esquive wrote:Should the port be 80?
No. That's for the HTTP protocol.
spitfire_esquive wrote:mysql.default_port =
Add a value there and see if it works. 3306, for example.

Posted: Mon Dec 26, 2005 7:15 am
by spitfire_esquive
still no luck :( also tried the other ports, the choices in the installer are 3306-3309. hmmm....

Posted: Mon Dec 26, 2005 7:24 am
by m3mn0n
By the way, "/etc/services" is for other platforms. You are running it on Windows, correct?

Have you made sure the servcie is running in the Services Manager? Have you tried a reinstall?

Posted: Mon Dec 26, 2005 8:34 am
by AGISB
You most likly have to recompile php and configure it with the new mysql. Then most likely apache has to be recompiled as well.

Posted: Mon Dec 26, 2005 11:08 am
by onion2k
AGISB wrote:You most likly have to recompile php and configure it with the new mysql. Then most likely apache has to be recompiled as well.
Only is you want to use MySQL 4.1's native password system. If you're willing to use OLD_PASSWORD() to set your MySQL user's up then you shouldn't have to change PHP.

Posted: Mon Dec 26, 2005 8:45 pm
by spitfire_esquive
i'm currently reading about the native password thingy of mysql 4.1+ wow....