2020-12-21 15:58:41 +00:00
|
|
|
CREATE DATABASE IF NOT EXISTS seaweedfs;
|
|
|
|
CREATE USER IF NOT EXISTS 'seaweedfs'@'%' IDENTIFIED BY 'secret';
|
2022-05-23 13:53:35 +00:00
|
|
|
GRANT ALL PRIVILEGES ON seaweedfs.* TO 'seaweedfs'@'%';
|
2020-12-21 15:58:41 +00:00
|
|
|
FLUSH PRIVILEGES;
|
|
|
|
USE seaweedfs;
|
|
|
|
CREATE TABLE IF NOT EXISTS filemeta (
|
|
|
|
dirhash BIGINT COMMENT 'first 64 bits of MD5 hash value of directory field',
|
|
|
|
name VARCHAR(1000) COMMENT 'directory or file name',
|
|
|
|
directory TEXT COMMENT 'full path to parent directory',
|
|
|
|
meta LONGBLOB,
|
|
|
|
PRIMARY KEY (dirhash, name)
|
|
|
|
) DEFAULT CHARSET=utf8;
|