且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

mysql& gt;使用mysql;但是...错误1044(42000):用户''的访问被拒绝@' localhost'到数据库' mysql'

更新时间:2021-10-08 03:56:38

感谢所有,终于我找到了使用错误的mysql配置重置根密码…它对我来说很好:)

thanks all, finally I found this reset root password with wrong mysql config… and it works well for me :)

-转到您的xampp \ mysql \ bin \文件夹
-编辑my.ini,并在 [mysqld]
下插入 skip-grant-tables -重新启动MySQL
-通过运行mysql数据库中phpMyAdmin中的 UPDATE mysql.user SET Password = PASSWORD('new_password')WHERE User ='root'来为您的root用户设置新密码(如果这样,则将其保留为无法从远程主机访问MySQL)

-Go to your xampp\mysql\bin\ folder
-Edit my.ini and insert skip-grant-tables below [mysqld]
-Restart MySQL
-Set new password for your root user by running UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root' in phpMyAdmin in the mysql database (or just leave it like this if MySQL cannot be accessed from remote hosts)

AndreKR