31 lines
1.4 KiB
Org Mode
31 lines
1.4 KiB
Org Mode
:PROPERTIES:
|
|
:ID: ae46c92b-d5fd-4172-944f-9165a61d2217
|
|
:END:
|
|
#+title: maria_DB
|
|
Maria_DB is a [[id:df046fd7-1f82-4e12-9065-56d222f56408][dockerized]] Databse, that can be connected to many containers like [[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]]. The Database has to be listed inside a [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose file]] or must be connected to the other container via the same [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-network]].
|
|
|
|
|
|
* connect to maria DB
|
|
If yiu want to connect to the Database to make take some manual actions, go into [[id:4afb1f41-983a-4b54-9828-a1e3788eb28b][portainer-docker]] UI and connect to the docker cointainer via virtual bash shell. Log in as [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]]
|
|
and issue the command:
|
|
|
|
#+begin_src bash
|
|
mysql -u root -p
|
|
#+end_src
|
|
Insert your root password and use the command ~connect <databse name>~ to connect to your database.
|
|
|
|
** usecases
|
|
You can erase entries from the blacklist of nextcloud (for too many login approaches to the [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]])
|
|
*** to show brute force entries
|
|
#+begin_src bash
|
|
SELECT * FROM oc_bruteforce_attempts;
|
|
#+end_src
|
|
*** To erase entries
|
|
#+begin_src bash
|
|
DELETE FROM oc_bruteforce_attempts WHERE IP="xxx.xxx.xxx.xxx";
|
|
#+end_src
|
|
*** erase the blocklist entirely
|
|
#+begin_src bash
|
|
DELETE FROM oc_bruteforce_attempts;
|
|
#+end_src
|