
Originally Posted by
manju
#
MySQL is a database management system.
A database is a structured collection of data. It may be anything from a simple shopping list to a picture gallery or the vast amounts of information in a corporate network. To add, access, and process data stored in a computer database, you need a database management system such as MySQL Server. Since computers are very good at handling large amounts of data, database management systems play a central role in computing, as standalone utilities, or as parts of other applications.
???
Fill in the $username and the $password below and run this code:
PHP Code:
<?php
$server = 'localhost';
$username = '';
$password = '';
$link = mysql_connect($server, $username, $password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
If this doesn't work, all you can do is make certain you have the right values for $server, $username, and $password. The file you are running is on your C: drive. Are you sure there is a MySQL server with your username on the same machine as the script?
Bookmarks