Jump to content

Creating a persistent db connection


horaliar

Recommended Posts

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!
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

  • 3 weeks later...
[!--quoteo(post=344207:date=Feb 9 2006, 12:40 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Feb 9 2006, 12:40 PM) [snapback]344207[/snapback][/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!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.