CREATE TABLE contact (
id INT NOT NULL AUTO_INCREMENT,
contact_name VARCHAR(20) NOT NULL,
tel1 VARCHAR(11) NOT NULL,
tel2 VARCHAR(11) NULL,
create_date DATE,
PRIMARY KEY(id)
);
DROP TABLE mac;
CREATE TABLE mac (
id INT NOT NULL AUTO_INCREMENT,
contact_name VARCHAR(20) NOT NULL,
mac1 VARCHAR(16) NOT NULL,
ip1 VARCHAR(15) NOT NULL,
mac2 VARCHAR(16) NULL,
ip2 VARCHAR(15) NULL,
create_date DATE,
PRIMARY KEY(id)
);
CREATE TABLE `due` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`due_date` date NOT NULL,
`due_sum` decimal(10,2) NOT NULL,
`due_name` varchar(50) NOT NULL,
`due_remark` varchar(200) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8
CREATE TABLE `bill` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`bill_date` DATE NOT NULL,
`bill_sum` FLOAT NOT NULL,
`bill_name` VARCHAR(200) NOT NULL,
`bill_enddate` DATE DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MYISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
CREATE TABLE `enpense` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`enpense_date` DATE NOT NULL,
`enpense_sum` FLOAT NOT NULL,
`enpense_name` VARCHAR(200) NOT NULL,
`end_date` DATE DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MYISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
http://database.51cto.com/art/201010/229171.htm
查看mysql字符集
mysql 5.7 zip版本的安装配置,修改root密码
http://www.jb51.net/article/98481.htm
密码过期的修改方法
http://zhangjinlong87.blog.163.com/blog/static/1942067720152182533788/
select host,user,passwd_expired from user;
修改passwd_expired 为N,即可。
数据库教程
http://www.runoob.com/mysql/mysql-clone-tables.html
mysql 建立用户和权限分配
http://blog.csdn.net/xuxile/article/details/53161908
GRANT SELECT ON alantop.enpense TO xifei@'%' IDENTIFIED BY '123'
flush privileges;