跪求各位js高手,数据库连接失败:Access denied for user 'root'@'localhost' (using password: YES)??
<?phpheader('Content-Type:text/html;charset=utf-8');define('DB_HOST','localhost');def...
<?php
header('Content-Type:text/html;charset=utf-8');
define('DB_HOST','localhost');
define('DB_USER','root');
define('DB_PWD','');
//define('DB_PWD','123456');
define('DB_NAME','blog_user');
$conn = @mysql_connect(DB_HOST,DB_USER,DB_NAME)or die('数据库连接失败:'.mysql_error());
@my_select_db(DB_NAME)or die('数据库错误:'.mysql_error());
@my_query('SET NAMES UTF8')or die('字符集错误:'.mysql_error());
?> 展开
header('Content-Type:text/html;charset=utf-8');
define('DB_HOST','localhost');
define('DB_USER','root');
define('DB_PWD','');
//define('DB_PWD','123456');
define('DB_NAME','blog_user');
$conn = @mysql_connect(DB_HOST,DB_USER,DB_NAME)or die('数据库连接失败:'.mysql_error());
@my_select_db(DB_NAME)or die('数据库错误:'.mysql_error());
@my_query('SET NAMES UTF8')or die('字符集错误:'.mysql_error());
?> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询