LCA sysadmin miniconf
2021Jan23 @ 12:15
Melbourne
der.hans
CDE
Object Rocket, a rackspace company
https://www.ObjectRocket.com/
Yes, we’re hiring :)
ObjectRocket
https://www.objectrocket.com/careers/
Rackspace Technologies
https://rackspace.jobs/
MYSQL_PS1
export MYSQL_PS1="(\u@\h:\d)> "
$ grep MYSQL_PS1 ~/.bashrc
export MYSQL_PS1="(\u@${HOSTNAME%.*.*}:\d)> "
$
$ mysql -u root -p password
$ mysql -u root -p
SQL SECURITY
DEFINER
INVOKER
Use for schema dumps
Include mysql.proc
to preserve routine creation timestamps
--no-data –routines –skip-add-locks –skip-opt --triggers –all-databases
Cool tool, still uses a lot of resources
Put MySQL data on snapshotable filesystem
Snapshot still requires short read-lock
mylvmbackup
works with LVMv2
/var/log/mysql/
Use the tools we know
sed | grep | awk | cut | sort | uniq
$ mysql -e "select album from music" | grep -i horse
$ mysql -B -e "select user, host from mysql.user" | awk '$1 == "root" && $2 !~ /localhost|127.0.0.1|::1/'
$ mysql -e "show replica status\G" | grep -E 'Master_Host|Slave_.*_(State|Running)|Seconds_Behind_Master|Last_.*_Err'
libreadline
mysql> pager less
set global innodb_max_dirty_pages_pct = 0;
Always specify character set when creating a DB or table
Or get used to Swedish
Thanks to the LCA organizers and other volunteers for running a conference for us to enjoy
Thanks to the FLOSS database community in its many forms
Thanks to Brian for the Open SSH Home game image
Thanks to OpenBSD and OpenSSH for that critical tool
Mahlzeit!