老师 出现ERROR 1046(3D000): No Database Selected怎么办
CREATE DATABASE IF NOT EXISTE `renyuan`;
USE `renyuan`;
-- 管理员表
DROP TABLE IF EXISTS `renyuan_admin`;
CREATE TABLE `renyuan_admin`(
`id` tinyint unsigned auto_increment key,
`username`varchar(20)not null unique,
`password` char(32)not null,
`email` varchar(50)not null
);
-- 分类表
DROP TABLE IF EXISTS `renyuan_cate`;
CREATE TABLE `renyuan_cate`(
`id` smallint unsingned auto_increment key,
`cName` varchar(50) unique
);
-- 人员表
DEOP TABLE IF EXISTS `renyuan_user`;
CREATE TABLE `renyuan_user`(
`id` int unsigned auto_increment key,
`username` varchar(20) not null unique,
`password` char(32) not null,
`sex` enum("男","女","保密") not null default "保密",
`face` varchar(50) not null,
`regTime` int unsigned not null
);
-- 相册表
DROP TABLE IF EXISTS `renyuan_album`;
CREATE TABLE `renyuan_album`(
`id` int unsigned auto_increment key,
`albumPath` varchar(50) not null
);