Could not connect to MySQL: Access denied for user 'root'@'localhost' (using password: NO)
我不能使用用户名(Root)访问我的数据库,也不能使用任何密码,我该怎么办?我也不能通过MySQL控制台访问。我试图配置config.inc.php文件,但没有作用。
请告诉我如何不丢弃WAMP,也不需要重新装载。
十分感谢
Aleksandar
Could not connect to MySQL: Access denied for user 'root'@'localhost' (using password: NO)
我不能使用用户名(Root)访问我的数据库,也不能使用任何密码,我该怎么办?我也不能通过MySQL控制台访问。我试图配置config.inc.php文件,但没有作用。
请告诉我如何不丢弃WAMP,也不需要重新装载。
十分感谢
Aleksandar
It seems that you have forgotten your mysql root user password. I think you should reinstall WAMPP and then set the mysql root user password from command line. To set the mysql root user password you have to first login to mysql from command line using this command: mysql -u root. When it asks for password just enter. After that enter following commands:
SET PASSWORD for 'root'@'localhost' = password('enteryourpassword');
SET PASSWORD for 'root'@'127.0.0.1' = password('enteryourpassword');
SET PASSWORD for 'root'@'::1' = password('enteryourpassword');