sql

MySQL / MariaDB Database

Login
mysql -u root -p

Optimize all databases
mysqlcheck --optimize --all-databases --host=localhost --user=${DB_USER} --password=${DB_PASS}

Links
phpMyAdmin - phpMyAdmin downloads

GUI
apt-get install -y mysql-admin

Allow access from outsice
sed -i 's|bind-address|#bind-address|g' /etc/mysql/my.cnf
/etc/init.d/mysql restart

Allow access to database magento for user dbo_magento from any host

PL / SQL

View all DBA objects (all tables from HR)
select *
from dba_objects
where OWNER = 'HR'
and OBJECT_TYPE = 'TABLE'

Remove non numeric char
select REGEXP_REPLACE(coll, '[^[:digit:]]', '')
from TABLE