horaliar Posted February 9, 2006 Share Posted February 9, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/3368-creating-a-persistent-db-connection/ Share on other sites More sharing options...
zq29 Posted February 9, 2006 Share Posted February 9, 2006 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 Link to comment https://forums.phpfreaks.com/topic/3368-creating-a-persistent-db-connection/#findComment-11511 Share on other sites More sharing options...
horaliar Posted February 28, 2006 Author Share Posted February 28, 2006 [!--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! Quote Link to comment https://forums.phpfreaks.com/topic/3368-creating-a-persistent-db-connection/#findComment-13091 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.