Skip to content

suensky/gistbin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gistbin

MySQL

Installation

brew install mysql

Start MySQL

To start mysql now and restart at login:

brew services start mysql

Or, if you don't want/need a background service you can just run:

/opt/homebrew/opt/mysql/bin/mysqld_safe --datadir\=/opt/homebrew/var/mysql

Connect to MySQL

mysql -u root

-- OR

mysql -D snippetbox -u web -p
-- PASSWORD: pass

Browse

Curl

curl -i "http://localhost:4000/gist/view?id=1”

Security

TLS

Generate a TLS certificate

go run /usr/local/go/src/crypto/tls/generate_cert.go --rsa-bits=2048 --host=localhost