Jump to content


Photo

Creating a persistent db connection


  • Please log in to reply
2 replies to this topic

#1 horaliar

horaliar
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 09 February 2006 - 08:38 PM

I'm totally new to the php and mysql world. I just downloaded the required software to start learning and I have a bit of a problem. I don't have a server and I installed MySQL on my machine and I've found on several tutorials that a persistent database conection is required in order to complete such tutorial. How can I create this type of conection? Another thing, I'm not so sure if I installed MySQL correctly, when I log in, I'm not asked for a username, only for a password. Help! Thanks!

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 09 February 2006 - 08:40 PM

If its only asking you for a password, you have not set up any additional accounts, and as such it is auto logging you into root - I guess.

You can open a persistant connection with mysql_pconnect() - Check the PHP manual for more info.

#3 horaliar

horaliar
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 28 February 2006 - 07:45 PM

[!--quoteo(post=344207:date=Feb 9 2006, 12:40 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Feb 9 2006, 12:40 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
If its only asking you for a password, you have not set up any additional accounts, and as such it is auto logging you into root - I guess.

You can open a persistant connection with mysql_pconnect() - Check the PHP manual for more info.
[/quote]

Sorry for not answering, I thought I would receive an e-mail notification once a post was made to the question. My problem was solved and you are completely right, I haven't set up any accounts so that's why it automatically logs me in as root only. Thanks!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users