upgraded to MySQL 4.1 from 3.23 but...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
spitfire_esquive
Forum Commoner
Posts: 37
Joined: Sun Nov 06, 2005 6:46 am

upgraded to MySQL 4.1 from 3.23 but...

Post 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!
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

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

Post 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.
spitfire_esquive
Forum Commoner
Posts: 37
Joined: Sun Nov 06, 2005 6:46 am

Post by spitfire_esquive »

still no luck :( also tried the other ports, the choices in the installer are 3306-3309. hmmm....
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post 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?
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Post 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.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
spitfire_esquive
Forum Commoner
Posts: 37
Joined: Sun Nov 06, 2005 6:46 am

Post by spitfire_esquive »

i'm currently reading about the native password thingy of mysql 4.1+ wow....
Post Reply