Forum Moderators: coopster

Message Too Old, No Replies

Call to undefined function mysql connect()

Cannot connect to mysql database

         

mvaz

10:30 pm on Apr 19, 2009 (gmt 0)

10+ Year Member



Hi Guys, up until last night, all was fine and all of a sudden my php has stopped talking to mysql giving the above fata error. No matter how I look at it, it glares back to me saying like you cant fix me.

Can the experts here please advise what might have gone wrong with my installation? I have had all my scripts working fine with db input and extracts working just the way they should and then this.

BTW, I am working on vista and running wamp5 with all services running and server online.

Any help would be very helpful.

Many thanks - Melwyn

mvaz

9:07 pm on Apr 20, 2009 (gmt 0)

10+ Year Member



Any insight on this?

coopster

9:22 pm on Apr 20, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I believe there is a MySQL troubleshooting list in the PHP Forum Library. Did you change anything recently?

mvaz

9:26 pm on Apr 20, 2009 (gmt 0)

10+ Year Member



Not at all. I shut down my laptop, booted it again the next day, and there it was, no access to mysql and now I am struggling to get it working again. :(

coopster

9:33 pm on Apr 20, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Open up Windows Services and be sure that the server is up and running. Here is that troubleshooting thread ...
[webmasterworld.com...]

mvaz

9:34 pm on Apr 20, 2009 (gmt 0)

10+ Year Member



Thanks Coopster, will check, implement and let you know on the results. Regards

henry0

12:18 pm on Apr 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wamp5 is so easy to manage and start.
if you still are in trouble, rename wamp5 "OLD" (just in case..)
save your DB and whatever is in WWW.
then D-load a new one etc..
10 minutes ..done...

subhankar ray

8:56 pm on Apr 21, 2009 (gmt 0)

10+ Year Member



I had a similar situation on a LINUX server when it [the partition] ran out of space.

mvaz

8:53 am on Apr 22, 2009 (gmt 0)

10+ Year Member



Thanks henry0, subhankar - the previous tries and attempts to fix this failed, will now try the henry0 way.

BTW, could it be the microsoft updates on vista that may have caused this? If that is case, I will have to stop updating my machine to prevent a repeat.

mvaz

9:49 pm on Apr 22, 2009 (gmt 0)

10+ Year Member



Guys, got it all working back again. Followed henry0's tips and all's hunky dorey now. :-)

Thanks to all who contributed. - Melwyn

AndrewCF

2:28 am on Apr 23, 2009 (gmt 0)

10+ Year Member



If you are using Windows Vista, please check the PHP.ini file, and launch following test script:

test.php:
<?php
phpinfo():
?>

Please make sure the mysql extension is loaded.