mysql初始化数据库建表脚本
Posted 潜水的阳光
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql初始化数据库建表脚本相关的知识,希望对你有一定的参考价值。
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初始化数据库建表脚本的主要内容,如果未能解决你的问题,请参考以下文章