|
许多php程序的用户名都写的是root,我自己建了一个用户,然后在配置文件里写这个用户的名字和口令,但是在浏览时,就出错了,应该怎么设置这个用户,使得能够用他的名字和口令来做访问?
$dbserver = "localhost";
$dbname = "test";
$username = "root";
$userpass = "";
下面这个不行???
$dbserver = "localhost";
$dbname = "test";
$username = "czq";
$userpass = "czq123";
Warning: Access denied for user: 'czq@localhost' (Using password: YES) in /var/www/html/index.php on line 2
Warning: MySQL Connection Failed: Access denied for user: 'czq@localhost' (Using password: YES) in /var/www/html/index.php on line 2 |
|