calumrouge Posted December 2, 2006 Share Posted December 2, 2006 Hey,I know that this is probably a really n00by question, and yes, before anyone asks I am a 13 year old kid trying to code fo himself. Any way! :PI am quite new to PHP but I have created a MySql database on the server I am using, I have got the code need to connect to it:[font=Courier New]mysql_connect(servername,username,password);[/font]but I am not sure what to put for server name.My main address is: calum.1111mb.com (Yes free hosting.)My MySql Database is Called: calum_testMy Username is: CalumMy Password is: PRIVATE (Come on I'm not stupid!)My Port For MySQL is: 3306Could anyone please tell me what I need to put in my mysql_connect query for my database.Thanks ;D! Link to comment https://forums.phpfreaks.com/topic/29232-n00by-question/ Share on other sites More sharing options...
leeming Posted December 2, 2006 Share Posted December 2, 2006 [quote author=calumrouge link=topic=117118.msg477575#msg477575 date=1165076513]Hey,I know that this is probably a really n00by question, and yes, before anyone asks I am a 13 year old kid trying to code fo himself. Any way! :PI am quite new to PHP but I have created a MySql database on the server I am using, I have got the code need to connect to it:[font=Courier New]mysql_connect(servername,username,password);[/font]but I am not sure what to put for server name.My main address is: calum.1111mb.com (Yes free hosting.)My MySql Database is Called: calum_testMy Username is: CalumMy Password is: PRIVATE (Come on I'm not stupid!)My Port For MySQL is: 3306Could anyone please tell me what I need to put in my mysql_connect query for my database.Thanks ;D! [/quote]try "localhost" Link to comment https://forums.phpfreaks.com/topic/29232-n00by-question/#findComment-133997 Share on other sites More sharing options...
calumrouge Posted December 2, 2006 Author Share Posted December 2, 2006 Sorry I've just realised I'ved posted it in the wrong section , I think anyway. Sorry. :-[ Link to comment https://forums.phpfreaks.com/topic/29232-n00by-question/#findComment-133999 Share on other sites More sharing options...
Hypnos Posted December 2, 2006 Share Posted December 2, 2006 [quote author=calumrouge link=topic=117118.msg477575#msg477575 date=1165076513]but I am not sure what to put for server name.My main address is: calum.1111mb.com (Yes free hosting.)My MySql Database is Called: calum_testMy Username is: CalumMy Password is: PRIVATE (Come on I'm not stupid!)My Port For MySQL is: 3306[/quote]On free hosting, it will most likey be "localhost". 3306 is the default port, so you don't need to set that.$conn = mysql_connect("localhost", "Calum", "PRIVATE");mysql_select_db("calum_test", $conn); Link to comment https://forums.phpfreaks.com/topic/29232-n00by-question/#findComment-134000 Share on other sites More sharing options...
calumrouge Posted December 2, 2006 Author Share Posted December 2, 2006 Thanks ;D. Link to comment https://forums.phpfreaks.com/topic/29232-n00by-question/#findComment-134003 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.