Mysql之创建简单网站后台管理员表

create database bee charset=utf8;
//建立数据库管理员bee给所有ip(@'%')密码为1234
grant all privileges on bee.* to 'bee'@'%' identified by '1234';

use bee;

create table bee_admin( admin_id int unsigned not null auto_increment, admin_name varchar(32) not null default '' comment '管理员姓名', admin_pass char(32) not null default '' comment '密码,MD5', role_id int unsigned not null default 0 comment '所属角色ID,RBAC', //select inet_aton('127.0.0.1');select inet_ntoa('2130706433');
    last_ip int unsigned not null default 0 comment '上次登录ip',
    last_time int comment '上次登录时间',
    primary key(admin_id)
)charset=utf8 engine=myisam;

你可能感兴趣的:(mysql,管理)