數據庫我使用WAMP並寫了一個PHP腳本連接到數據庫,我不認爲它的代碼,因爲我收到說SCREAM: Error suppression ignored for
,然後一個錯誤得到幾個不同的錯誤,有人說:我不能創建我的PHP和MySQL
Warning: mysql_connect(): MySQL server has gone away in C:\wamp\www\php.php
Warning: mysql_connect(): Error while reading greeting packet. PID=9044 in C:\wamp\www\php.php
Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\php.php
這裏是我的代碼:
<?php
$con = mysql_connect("127.0.0.1:80",'user','');
if(!$con){
die('error:' . mysql_error());
}
$db = 'CREATE DATABASE db_one';
if(mysql_query($db,$con)){
echo 'data base created';
}
else {
echo 'Err:' . mysql_error();
}
$table = 'CREATE TABLE persons (fname varchar (15),lname varchar(15), age int)';
mysql_query($table,$con);
mysql_close($con);
?>
哪裏碼? – samayo
你說什麼讓它消失? – Kermit
你開始了mysql服務嗎? –