What kind of hash does mysql use?(mysql使用什么样的哈希?)
问题描述
我正在编写自己的代码,类似于 phpMyAdmin.但我需要用户能够使用 mysql 数据库中的用户名和密码登录.我需要知道 mysql 数据库使用哪种散列来存储每个用户的密码.我检查了 dev.mysql.com 的答案,但找不到任何东西,除了以 * 开头的较新的 41 字节哈希.
I'm writing my own code similar to phpMyAdmin. But I'll need the user to be able to sign on using their username and password from the mysql database. I need to know what kind of hash the mysql database uses to store each users password. I checked dev.mysql.com for answers but couldnt find anything, other than its the newer 41 byte hash beginning with an *.
推荐答案
我不认为你将能够解密存储在 MySQL 表中的密码,使用存储在 mysql 中的密码也没有用代码>.<代码>用户代码>表.
I don't think you will be able to decrypt password stoed in MySQL table and it's of no use using password which is stored in mysql
.user
table.
您应该使用在您的应用程序中创建 User
时设置的密码,如果您丢失了用户密码,那么您可以使用 mysqladmin
重置它
You should be using password that is being set when User
is created in your application, If you have lost password of users then you can reset it using mysqladmin
设置 'user-name-here'@'hostname-name-here' 的密码 = PASSWORD('new-password-here');
SET PASSWORD FOR 'user-name-here'@'hostname-name-here' = PASSWORD('new-password-here');
这篇关于mysql使用什么样的哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:mysql使用什么样的哈希?


基础教程推荐
- 带有WHERE子句的LAG()函数 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01