简体   繁体   English

我使用phpmyadmin更改了WordPress密码,现在出现数据库错误

[英]I changed my WordPress password using phpmyadmin, now I have a database error

So here's what happened. 这就是发生了什么。 The website was working just fine but I inherited the website from someone else and the previous designer failed to provide the login information. 该网站运行正常,但我是从其他人那里继承该网站的,以前的设计师未能提供登录信息。 So, I needed to reset the admin password. 因此,我需要重设管理员密码。 I accessed the WordPress database using phpMyAdmin following the instructions at http://codex.wordpress.org/Resetting_Your_Password#Through_phpMyAdmin . 我按照http://codex.wordpress.org/Resetting_Your_Password#Through_phpMyAdmin上的说明使用phpMyAdmin访问了WordPress数据库。

I did notice something on the 'wp_users' page that I thought was interesting. 我确实在“ wp_users”页面上注意到了一些我认为很有趣的东西。 Every password starts with a '$P$B' except for the one that I just changed which has no special characters like $ and uses just letters and numbers. 每个密码都以“ $ P $ B”开头,除了我刚刚更改的密码外,该密码没有特殊字符(如$)并且仅使用字母和数字。 I selected MD5 from the dropdown when resetting my password so I am wondering if I need to use a different encryption type. 重置密码时,我从下拉菜单中选择了MD5,所以我想知道是否需要使用其他加密类型。 I tried SHA1 just to be safe but that wasn't it and it doesn't look like it could be any of the other dropdown options. 我尝试使用SHA1只是为了安全起见,但事实并非如此,它看起来可能不是其他任何下拉选项。

If all you want to do is reset the password, then MD5 is perfectly fine. 如果您只想重置密码,那么MD5就可以了。 WordPress implements the portable PHP password hashing framework (phpass), and uses MD5-based salted portable hashes to store passwords. WordPress实现了可移植的PHP密码哈希框架 (phpass),并使用基于MD5的盐腌可移植哈希来存储密码。 The $P$ comes into it as WordPress forces this at the start of all encrypted passwords as an identifier (see here ). $P$进入其中是因为WordPress在所有加密密码的开头强制将其作为标识符(请参阅此处 )。

If you just use the default MD5 in the database, once you login (and it will let you login!), WordPress will rehash automatically using phpass. 如果您仅在数据库中使用默认的MD5,则登录后(它将让您登录!),WordPress将使用phpass自动重新哈希。

What I'd do is create a new user with the password you want to have in the end and then copy the hash from the new user to the user you wanted to change. 我要做的是使用您最终想要的密码创建一个新用户,然后将哈希从新用户复制到您想要更改的用户。 This way no matter what encryption is used, you will use the same type. 这样,无论使用哪种加密,都将使用相同的类型。

Ideally wordpress should be smart enough about this, but the way I propose will ensure that you will have the appropriate password. 理想情况下,wordpress应该对此足够聪明,但是我建议的方式将确保您具有适当的密码。

Just like that, the website is fine. 这样,该网站就可以了。 I didn't touch anything and came back to it this morning so it looks like it may have been something server-side? 我什么都没碰,今天早晨又回到了上面,所以看起来好像是服务器端的东西?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 更改了 phpMyAdmin 的 root 密码,现在我无法访问任何 MAMP - Changed root password for phpMyAdmin, now I can't access anything MAMP 我重置了xampp localhost的密码,现在我无法进入phpmyadmin - i reset my password for xampp localhost and now i cant get on phpmyadmin WORDPRESS:我刚刚在我的wp_user行创建了一个带有phpMyadmin的额外列,我现在需要每个用户在登录时更新该列 - WORDPRESS: I have just created an extra column with phpMyadmin on my wp_user row, I now need each user to update that column when logged in 我有一个连接到phpmyadmin的laravel网站,但现在我想将android应用程序连接到同一数据库 - I have a laravel website that is connected to phpmyadmin but now I want to connect android app to same database 我从 phpmyadmin 中删除了所有用户,现在它说'#1045 - 用户'root'@'localhost' 访问被拒绝(使用密码:NO)' - I deleted all the users from phpmyadmin and now it is saying '#1045 - Access denied for user 'root'@'localhost' (using password: NO)' 'root'@'localhost'拒绝访问数据库'mysql',即使我已经使用root用户名和密码登录phpmyadmin - 'root' @ 'localhost' denied access to database 'mysql' even though I have already logged into phpmyadmin using the root username and password 我从 phpmyadmin 环境中导出数据库时出错 - i have a error in exporting database from phpmyadmin Environment WordPress:我更改了主文件夹的名称和位置,现在无法在浏览器中访问它? - Wordpress : I changed the name and location of my main folder and now I can't access it in browser? 如何更改我的phpmyadmin密码? - How do I change my phpmyadmin password? 我已将网站从php更改为ASP? 现在如何处理我的旧网址 - I have changed my site from php to ASP? Now What to do with my Old URL's
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM