View Full Version : How to configure Mysql server
Susanz81
Apr 22nd 2007, 10:05 pm
Dear all, I am using easyphp. It is showing mysql server was started. But, How can I connect or configure this server?
commandos
Apr 22nd 2007, 10:28 pm
Right click on the icon in the sidebar --> configuration --> mysql .
Susanz81
Apr 22nd 2007, 10:57 pm
It opens just a notepad. But the following program not executing.
Program:
<?php
$con = mysql_connect();
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
commandos
Apr 23rd 2007, 4:52 am
you need to put a user name , password , connection
exactly like any web application
TechEvangelist
Apr 23rd 2007, 4:57 am
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() );
}
Just substitute the proper values for the variables.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.