For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > January 2006 > Upgraded database and now can't connect









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Upgraded database and now can't connect
Tony Wainwright

2005-12-18, 6:56 pm

Hi guys

I am a bit of a newcomer at this php and mysql - however I been following a
self teach book taht uses MySQL 4.0.21 and PHP 5.0.2. After working through
some examples I had to reformat my machine and took the opportunity to
upgrade to MySQL 5.0.16. and now my php scripts don't connect i.e if I use
the line

if ($dbc = @mysql_connect ('localhost','freddie','1234') ....nothing
happens.

Have I missed something when I re-installed MySQL

Thanks
Tony


Stuart Millington

2005-12-18, 6:56 pm

On Sun, 18 Dec 2005 15:55:41 +0000 (UTC), "Tony Wainwright"
<teejayuu@btinternet.com> wrote:

>self teach book taht uses MySQL 4.0.21 and PHP 5.0.2. After working through
>some examples I had to reformat my machine and took the opportunity to
>upgrade to MySQL 5.0.16. and now my php scripts don't connect i.e if I use


You need to use mysqli instead:
http://uk.php.net/manual/en/ref.mysqli.php


--
------------------------------------------------------------------
- Stuart Millington ALL HTML e-mail rejected -
- mailto:phupp@dsv1.co.uk http://w3.z-add.co.uk/ -
Andy Hassall

2005-12-18, 6:56 pm

On Sun, 18 Dec 2005 15:55:41 +0000 (UTC), "Tony Wainwright"
<teejayuu@btinternet.com> wrote:

>if ($dbc = @mysql_connect ('localhost','freddie','1234') ....nothing
>happens.
>
>Have I missed something when I re-installed MySQL


"@" ignores error messages. You don't want to do that.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jim Michaels

2006-01-18, 6:57 pm

wasn't that a PHP beta? I can't remember. try upgrading to 5.1.2. with
newer PHP probably comes newer db client-ware libraries.
when I upgraded my database, sqlyog 3.0 client would no longer connect.
neither would the query browser(I think). so I had to upgrade the query
browser and administrator tool. everything worked except sqlyog, which cost
money to upgrade.

"Tony Wainwright" <teejayuu@btinternet.com> wrote in message
news:do40pt$qkj$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
> Hi guys
>
> I am a bit of a newcomer at this php and mysql - however I been following
> a self teach book taht uses MySQL 4.0.21 and PHP 5.0.2. After working
> through some examples I had to reformat my machine and took the
> opportunity to upgrade to MySQL 5.0.16. and now my php scripts don't
> connect i.e if I use the line
>
> if ($dbc = @mysql_connect ('localhost','freddie','1234') ....nothing
> happens.
>
> Have I missed something when I re-installed MySQL
>
> Thanks
> Tony
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com