Skip to content

Instantly share code, notes, and snippets.

@rolandvarga
rolandvarga / MySQL_macOS_Sierra.md
Created February 17, 2019 19:33 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@rolandvarga
rolandvarga / flush-dns.sh
Created July 19, 2017 15:47 — forked from craigvantonder/flush-dns.sh
Flushing the DNS in Ubuntu 16.04
#!/bin/bash
# run this command to flush dns cache:
sudo /etc/init.d/dns-clean restart
# or use:
sudo /etc/init.d/networking force-reload
# Flush nscd dns cache:
sudo /etc/init.d/nscd restart
# If you wanted to refresh your settings you could disable and then run
sudo service network-manager restart

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

RENAMING SESSIONS:

C-a :sessionname mySessionName

Screen's -X switch lets you rename a session without attaching it.

screen -X sessionname foobars

LIST RUNNING SESSIONS:

ALTER TABLESPACE

ALTER USER username TEMPORARY TABLESPACE temp_tablespace_name;
ALTER USER username DEFAULT TABLESPACE tablespace_name;

SHOW TABLESPACE USAGE

select df.tablespace_name "Tablespace",
       totalusedspace "Used MB",

(df.totalspace - tu.totalusedspace) "Free MB",