From 51b7ab6c5ae38ce53b767ccc2c1257b8e1ab686a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilhem=20Faur=C3=A9?= Date: Fri, 14 Apr 2023 08:35:47 +0000 Subject: [PATCH] init scripts to initialize database from the sql dump --- init.sh | 3 +++ init.sql | 4 ++++ 2 files changed, 7 insertions(+) create mode 100755 init.sh create mode 100644 init.sql diff --git a/init.sh b/init.sh new file mode 100755 index 0000000..85a391a --- /dev/null +++ b/init.sh @@ -0,0 +1,3 @@ +#!/bin/sh +sudo mysql < init.sql +mysql --user=spip --password=password spip < $(realpath "$1") diff --git a/init.sql b/init.sql new file mode 100644 index 0000000..dd3412a --- /dev/null +++ b/init.sql @@ -0,0 +1,4 @@ +CREATE USER 'spip'@'localhost' IDENTIFIED BY 'password'; +CREATE DATABASE IF NOT EXISTS spip CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; +GRANT ALL PRIVILEGES ON spip.* TO 'spip'@'localhost'; +FLUSH PRIVILEGES;