FUNCTION databasename.SHA2 does not exist

柔情痞子 提交于 2019-12-24 02:35:25

问题


I am hosting my domain on goddady and am trying to hash the passwords in the database. However, it throws the error:

MySQL said: 

#1305 - FUNCTION dbname.SHA2 does not exist 

This is the command I'm using to insert the data in the db.

insert into `dbname`.`tbl_members` values ('1', 'admin', SHA2('password', 224));

This works perfectly fine when I execute it on my local server.


回答1:


It's probably a version problem.

SHA2() was added in MySQL 5.5.5.



来源:https://stackoverflow.com/questions/5596238/function-databasename-sha2-does-not-exist

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!