Category: database / MariaDB / MySQL / Postgress / DB

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 on 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: /etc/init.d/mysql stop; # stop mysql service # if that did not help try: killall mysqld; now you have two […]

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 […]