Skip to content

Instantly share code, notes, and snippets.

@austinklenk
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austinklenk/6de89d58f226e33a6cfe to your computer and use it in GitHub Desktop.
Save austinklenk/6de89d58f226e33a6cfe to your computer and use it in GitHub Desktop.
Access Mysql Server from Terminal
#Anything surrounded in parenthesis represent a databasename / tablename
# Any Command in mysql requires a semi colon{;} after each statement
#Start Mysql
mysql.server start # <------ In Terminal, say Ruby on rails Application -->
#Access Databases
mysql -uroot # <--- In Terminal -->
#Select Database
use (database name here, not paranthesis); # In Mysql Requires Semi colon -->
#Show Tables in Database
show tables from (database name); # In Mysql Requires Semi colon -->
#Show Columns from table in database
show columns from table (tablename); # In Mysql Requires Semi colon -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment