Home >Web Front-end >HTML Tutorial >MySQL database connection failed? _html/css_WEB-ITnose
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:xampphtdocsliuyanbanconfig.php on line 3
Database connection failed
My code:
header('Content-Type: text/html;charset=utf-8');
$conn=mysql_connect('localhost',' root','111111')or die("Database connection failed");
mysql_select_db("guestbook")or die("Data table connection failed");
?>
No port number required?
See what the people below say
No database specified
I don’t understand PHP
MySQL
My new blog http://www.xiaxiaoyuzone.com