[英]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.