准备:下载Mysql5.1<mysql-essential-5.1.41-win32.msi>
安装:step by step
测试:1.MySQL测试
点开MySQL Command Line Client, 输入安装时建立的密码。
mysql> show databases;
mysql>use <<database name>>;
mysql>show tables;
mysql>select * from <<table name>>;
2.PHP测试
建立php测试页db.php
<?php
mysql_connect('localhost','<<user name>>','<<password>>') or die(mysql_error());
mysql_select_db("<<database name>>");
$query='select now()';
$conn=mysql_query($query) or die (mysql_error());
echo "QUERY: $query<br>";
$res=mysql_fetch_array($conn);
echo $res[0];
?>
mysql_connect('localhost','<<user name>>','<<password>>') or die(mysql_error());
mysql_select_db("<<database name>>");
$query='select now()';
$conn=mysql_query($query) or die (mysql_error());
echo "QUERY: $query<br>";
$res=mysql_fetch_array($conn);
echo $res[0];
?>