Category: database / MariaDB / MySQL / Postgress / DB

GNU Linux howto – enable (very detailed) logging logs log postgres database + monitor script
10.03.2024

#!WARNING! THIS WAS TESTED FOR OLDER RHEL7 AND CENTOS! # manual editing vim /var/lib/pgsql/12/data/postgresql.conf; # postgres main config file # semi-automatic editing via sed # optional: postgres: enable detailed logging POSTGRES_MAIN_CONFIG=”/var/lib/pgsql/12/data/postgresql.conf” sed -i ‘s/#log_statement = [^”]*/log_statement = ‘all’/g’ $POSTGRES_MAIN_CONFIG sed […]

MySQL MariaDB cheat sheet
14.07.2022

login to mysql: su – root; list all available databases: # login & send command to mysql & logout mysql -u root -e ‘show databases’ -s –skip-column-names # or login mysql -u root -p; # enter command mysql> show databases; […]

howto postgres
25.05.2020

postgres borrows concepts from mysql (now mariadb) postgres and mariadb are borth great databases, thanks all involved. (how to setup postgres 12 on centos 8 (very very latest)) let’s dive into hit: how to postgres: hostnamectl; # tested on Virtualization: […]

gnu-linux – setup postgres 12 on CentOS 8 – terminal bash – debugging postgresql connection problems
16.01.2020

here are the packages: https://download.postgresql.org/pub/repos/yum/ # updated: 2021-01 # the guide below is probably outdated # the official current howto https://www.postgresql.org/download/linux/redhat/ # tries to install postgres13 like this: # Install the repository RPM: dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm # Disable the […]

Russian IT Security Updates 2020-01
13.01.2020

now WITH SPICY COMMENTS X-D SecurityLab, [22.12.19 12:40] A Twitter user using the alias 08Tc3wBB created tfp0-an exploit that allows you to jailbreak the latest iPhone models with IOS 13.3. The functionality of the exploit has already been confirmed by […]

MySQL search replace update where sql query
14.02.2019

yes, it is NOT the most convenient, query you could imagine. UPDATE `table_name` SET `column_name` = REPLACE(`column_name`, ‘replace_this’, ‘with_this’) WHERE `column_name` LIKE ‘%with_this%’ COLLATE utf8mb4_bin; it is what phpmyadmin generates when you go here:

02.02.2018

docker exec -it -u postgres example-db psql; # login interactively SELECT * FROM pg_stat_activity WHERE datname = ‘example’; # check open connections to database example # (there shall be none, otherwise you can not drop the database) SELECT pg_terminate_backend (pg_stat_activity.pid) […]

Was macht eigentlich ORACLE?
28.01.2017

Jeder kennt Steve Jobs (now dead) – aber wer kennt schon “Larry” Ellison? 😀 Oracle hat 2010 die Firma “Sun Microsystem aufgekauft” und damit OpenSource Technologie wie Java, VirtualBox und MySQL eingekauft. Lawrence Joseph “Larry” Ellison (born August 17, 1944) […]

01.06.2015

tested with older GNU Linux Debian7 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux in any case you need to stop current mysql operation: # become root su – root /etc/init.d/mysql stop; # stop mysql service # if that did not […]

28.05.2015

MySQL – Resetting a lost MySQL root password warning this article is rather old and might be (partly) outdated! Article ID: 405 Last updated on August 31, 2012 Authored by: Rackspace Support creditz: http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password The MySQL root password allows full […]

03.02.2014

login to mysql to see what databases are there. mysql -u root -p mysql> show databases; +———————-+ | Database | +———————-+ | information_schema | | DatabaseXY | | DatabaseXYZ | | mysql | | phpmyadmin | +———————-+ 7 rows in […]