Skip to content

Instantly share code, notes, and snippets.

@merajsiddiqui
Created October 3, 2015 08:42
Show Gist options
  • Save merajsiddiqui/e9310915f7fc413400bb to your computer and use it in GitHub Desktop.
Save merajsiddiqui/e9310915f7fc413400bb to your computer and use it in GitHub Desktop.
Operating and working with mySql from terminal
Installing Mysql Srver
sudo apt-get install mysql
login Mysql
mysql -u username -p
Create a Database
create Database db_name;
Use Database
use db_name;
Show all Database
show databases;
Importing .sql file to a database
mysql -u root -p db_name < /var/www/html/DatingPortal/application/configuration/arif_shadi_bihar.sql
--if not all ready in mysql else
db_name < /var/www/html/DatingPortal/application/configuration/arif_shadi_bihar.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment