This commit is contained in:
Zheng Kai
2023-06-13 18:15:34 +08:00
parent 86ad8ec9b4
commit 8457bf7efa
10 changed files with 72 additions and 72 deletions

1
misc/db/.gitignore vendored
View File

@@ -1 +0,0 @@
*.sql

View File

@@ -1,20 +0,0 @@
#!/bin/bash
DB="orca"
DIR="$(dirname "$(readlink -f "$0")")" && cd "$DIR" || exit 1
mkdir -p table
for T in $(echo "SHOW TABLES" | mysql "$DB" --skip-column-names); do
/usr/bin/mysqldump \
--default-character-set=binary \
--add-drop-database \
--add-drop-table \
--add-locks \
--hex-blob \
--quick \
--skip-dump-date \
"${DB}" "${T}" > "table/${T}.sql"
done

View File

@@ -1,16 +0,0 @@
#!/bin/bash
DB="orca"
DIR="$(dirname "$(readlink -f "$0")")" && cd "$DIR" || exit 1
/usr/bin/mysqldump \
--default-character-set=binary \
--add-drop-database \
--add-drop-table \
--add-locks \
--hex-blob \
--quick \
--skip-dump-date \
--databases "$DB" \
> "${DB}-full.sql"

View File

@@ -1,18 +0,0 @@
#!/bin/bash
DB="orca"
DIR="$(dirname "$(readlink -f "$0")")" && cd "$DIR" || exit 1
/usr/bin/mysqldump \
--no-data \
--default-character-set=binary \
--add-drop-database \
--add-drop-table \
--add-locks \
--hex-blob \
--quick \
--skip-dump-date \
--databases "$DB" \
| sed 's# AUTO_INCREMENT=[0-9]*##g' \
> "${DB}-struct.sql"

View File

@@ -1,6 +0,0 @@
CREATE USER 'orca'@'172.17.0.0/24' IDENTIFIED WITH caching_sha2_password BY 'orca';
GRANT USAGE ON *.* TO 'orca'@'172.17.0.0/24';
ALTER USER 'orca'@'172.17.0.0/24' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, LOCK TABLES ON `orca`.* TO 'orca'@'172.17.0.0/24';
ALTER USER 'orca'@'172.17.0.0/24' ;

View File

@@ -1,6 +0,0 @@
CREATE USER 'orca'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'orca';
GRANT USAGE ON *.* TO 'orca'@'localhost';
ALTER USER 'orca'@'localhost' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, LOCK TABLES ON `orca`.* TO 'orca'@'localhost';
ALTER USER 'orca'@'localhost' ;

BIN
misc/img/grafana.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
misc/img/kibana.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB