加密函数
SELECT USER() FROM DUAL;--用户@ip地址
SELECT DATABASE();--查看当前数据库名称
SELECT MD5('hsp') FROM DUAL;--为字符串算出32字符串,常用加密
SELECT LENGTH(MD5('hsp')) FROM DUAL;
CREATE TABLE hsp_user(
id INT,
`name` VARCHAR(32) NOT NULL DEFAULT '',
pwd CHAR(32) NOT NULL DEFAULT '');
INSERT INTO hsp_user VALUES (100,'韩顺平',MD5('hsp'));
SELECT * FROM hsp_user;
SELECT PASSWORD('hsp') FROM DUAL;--加密函数,用户密码就是password加密
SELECT * FROM mysql.user;