Last active
August 29, 2015 14:10
-
-
Save austinklenk/6de89d58f226e33a6cfe to your computer and use it in GitHub Desktop.
Access Mysql Server from Terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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