我如何解决"警告"说它无法使用密码连接到SQL服务器:是的?

时间:2017-08-02 18:30:22

标签: mysql phpmyadmin

Warning: mysql_connect(): Access denied for user 'msuparam_17'@'localhost' (using password: YES) in /home/msuparam/public_html/17database/Formfeed/Formreg.php on line 11
Could not connect: Access denied for user 'msuparam_17'@'localhost' (using password: YES)

1 个答案:

答案 0 :(得分:0)

Access denied for user 'msuparam_17'@'localhost'

访问被拒绝意味着您可以建立与服务器的连接,但它已拒绝您的凭据。

您输入了错误的用户名,错误的密码,或者该用户实际上没有登录权限。

如果您可以以授权用户身份登录数据库,请确认该用户确实存在,并且可以登录。

mysql -u root -p
Password:
mysql> use mysql;

# Verify user actually exists
mysql> SELECT User,Host FROM user WHERE User="msuparam_17";

# Check permission for user
mysql> SHOW GRANTS FOR 'msuparam_17'@'localhost';