码迷,mamicode.com
首页 > 数据库 > 详细

mysql初始化数据库建表脚本

时间:2019-11-03 01:26:47      阅读:272      评论:0      收藏:0      [点我收藏+]

标签:key   host   word   policy   ima   roo   cal   ges   tab   

set names utf8;

set global validate_password.policy=LOW;
set global validate_password.length=6;
CREATE DATABASE If Not Exists ai_teaching Character Set UTF8;
CREATE USER ‘ai‘@‘localhost‘ IDENTIFIED BY ‘shixun‘;
GRANT all ON ai_teaching.* TO ‘ai‘@‘localhost‘;
GRANT all ON ai_teaching.* TO ‘root‘@‘%‘;

use ai_teaching;

create table IF NOT EXISTS `tbl_user_images`(
`id` INT UNSIGNED AUTO_INCREMENT,
`user_id` VARCHAR(40) NOT NULL,
`label_name` VARCHAR(255) NOT NULL,
`image` LONGBLOB NOT NULL,
`vector` VARCHAR(4000) NOT NULL,
PRIMARY KEY (`id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

mysql初始化数据库建表脚本

标签:key   host   word   policy   ima   roo   cal   ges   tab   

原文地址:https://www.cnblogs.com/yinliang/p/11784918.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!