You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
595 B

4 years ago
4 years ago
  1. CREATE DATABASE IF NOT EXISTS seaweedfs;
  2. CREATE USER IF NOT EXISTS 'seaweedfs'@'%' IDENTIFIED BY 'secret';
  3. GRANT ALL PRIVILEGES ON seaweedfs.* TO 'seaweedfs'@'%';
  4. FLUSH PRIVILEGES;
  5. USE seaweedfs;
  6. CREATE TABLE IF NOT EXISTS `filemeta` (
  7. `dirhash` BIGINT NOT NULL COMMENT 'first 64 bits of MD5 hash value of directory field',
  8. `name` VARCHAR(766) NOT NULL COMMENT 'directory or file name',
  9. `directory` TEXT NOT NULL COMMENT 'full path to parent directory',
  10. `meta` LONGBLOB,
  11. PRIMARY KEY (`dirhash`, `name`)
  12. ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;