在php中尝试链接数据库服务器
<?php
$con = mysql_connect ( “localhost”, “root”, “password” );
if (! $con) {
die ( ‘Could not connect: ‘ . mysql_error () );
} else {
echo “Database Connect Successfully!<br>”;
}
?>
Warning: mysql_connect(): No connection could be made because the target machine actively refused it. in D:WorkspaceSAEhtdocsEPPHelloPHPtext.php on line 2
Could not connect: No connection could be made because the target machine actively refused it.
在MySQL Workbench中进入 Sever Administration 的 Database Sever Instance 中的 Local MySQL55
Status check of service ‘MySQL55’ returned start pending
Status check of service ‘MySQL55’ returned stopped