priyankabhar Posted November 9, 2009 Share Posted November 9, 2009 Hi All, I need to connect to mysql database from my php script . I am using wamp server. I am new to php, netbeans and wamp. Can I use the mysql that comes with wamp server or should I download separate mysql? Thanks a lot, Priya Quote Link to comment https://forums.phpfreaks.com/topic/180822-solved-help-with-php-and-mysql/ Share on other sites More sharing options...
rajivgonsalves Posted November 9, 2009 Share Posted November 9, 2009 Yes you can use the mysql from the wampserver. just put <?php $link = mysql_connect("localhost", "root", "") or die("Cannot connect to server"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/180822-solved-help-with-php-and-mysql/#findComment-953959 Share on other sites More sharing options...
priyankabhar Posted November 9, 2009 Author Share Posted November 9, 2009 Thanks a lot Rajiv. It may sound stupid question, but which one is better? I mean, is using mysql from Wamp Server as effective as the mysql that I can download separately on my machine? Thanks, Priya Quote Link to comment https://forums.phpfreaks.com/topic/180822-solved-help-with-php-and-mysql/#findComment-953963 Share on other sites More sharing options...
rajivgonsalves Posted November 9, 2009 Share Posted November 9, 2009 Actually both the servers will be the same, since mysql is a software WAMP = Windows Apache, Mysql and PHP its just a package with all the softwares and configured automatically when you install to work together, so the mysql that installs will be the same mysql you download and install, so its basically the same Quote Link to comment https://forums.phpfreaks.com/topic/180822-solved-help-with-php-and-mysql/#findComment-953964 Share on other sites More sharing options...
priyankabhar Posted November 9, 2009 Author Share Posted November 9, 2009 Thanks again Rajiv. Quote Link to comment https://forums.phpfreaks.com/topic/180822-solved-help-with-php-and-mysql/#findComment-953969 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.