警告:mysqli :: mysqli():(HY000 / 1045):拒绝用户'root'@'localhost'(使用密码:否)

我正在使用MySQL与PHP打印来自数据库的详细信息。 正如我试图让一个新的用户,虽然成功,但是,我从MySQL错误,当我试图从中获取数据,它显示了我这个错误。

( ! ) Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) in D:\wamp\www\index_feed\index_feed.php on line 8 Call Stack # Time Memory Function Location 1 0.0010 238200 {main}( ) ..\index.php:0 2 0.0024 289384 require_once( 'D:\wamp\www\index_feed\index_feed.php' ) ..\index.php:48 3 0.0024 289672 feed_print( ) ..\index_feed.php:136 4 0.0024 291264 mysqli ( ) ..\index_feed.php:8 

这里的困境是我甚至没有使用“root”用户,是的,我有一个用户的密码,但在错误中显示using password : NO 。 我完全陷在这里,我认为这是using password的问题。

我已经尝试使用根获取数据,但它不起作用。 同样的错误出现了。