There are lots of sample scripts here for the beginners.
http://www.w3schools.com/php/php_mysql_intro.asp
I had found some php script regarding the connection, but it still can't work.
The error message is:
Warning: mysql_connect(): Can't connect to MySQL server on 'Solaris IP add' (10054) in c:\program files\easyphp1-7\www\view-taxo-solaris.php on line 11
Problem connecting to DataBaseCan't connect to MySQL server on 'Solaris IP add' (10054)
Below is my php script:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SEA Fruit flies Database System<</title>
</head>
<body bgcolor=#ffffff>
<h2>Data from taxo</h2>
<?
$MyConn=mysql_connect("Solaris IP add: port","root","");
if (!$MyConn) {
die ("Problem connecting to DataBase".mysql_error());
}
echo 'Connected successfully';
mysql_close($MyConn);
$query = "select * from taxo order by genus, species";
$result = mysql_db_query("seaff_2007", $query);
if ($result) {
echo "Found these entries in the database:<br><p></p>";
echo "<table width=90% align=center border=1><tr>
<td align=center bgcolor=#99CC00>Subfamily</td>
<td align=center bgcolor=#99CC00>Tribe</td>
<td align=center bgcolor=#99CC00>Subgenus</td>
<td align=center bgcolor=#99CC00>Genus</td>
<td align=center bgcolor=#99CC00>Species</td>
<td align=center bgcolor=#99CC00>Distribution</td>
</tr>";
while ($r = mysql_fetch_array($result)) {
$subf = $r["subfamily"];
$tribe = $r["tribe"];
$subg = $r["subgenus"];
$genus = $r["genus"];
$spe = $r["species"];
$distri = $r["distribution"];
echo "<tr>
<td>$subf</td>
<td>$tribe</td>
<td>$subg</td>
<td>$genus</td>
<td>$spe</td>
<td>$distri</td>
</tr>";
}
echo "</table>";
} else {
echo "No data.";
}
mysql_free_result($result);
?>
</body>
</html>
Should i put all my php file in the Solaris machine as well? Or i need to change any configuration in the Windows or Solaris machine? Just to stress that i would like to call out the data from solaris through my windows machine.
Thanks.