Dear all, I am using easyphp. It is showing mysql server was started. But, How can I connect or configure this server?
It opens just a notepad. But the following program not executing. Program: <?php $con = mysql_connect(); if (!$con) { die('Could not connect: ' . mysql_error()); } ?>
Unless you already have a database application installed, you will need to set up a user and a database before you can connect. Without that, you have nothing to connect to. You need to read some articles about working with MySQL. Commandos is right. You are not using a valid MySQL connection. You first need to connect a user, then you need to select a database. You can do both with the following line of code: mysql_select_db('$database', mysql_connect('localhost','$username','$password')) or die(mysql_error() ); } Code (markup): Just substitute the proper values for the variables.