Posted By

onefastsnail on 05/24/12


Tagged


Versions (?)

basics


 / Published in: Bash
 

  1. mysql -h hostname -u root -p
  2.  
  3. create database [databasename];
  4.  
  5. show databases;
  6.  
  7. use [db name];
  8.  
  9. show tables;
  10.  
  11. describe [table name];
  12.  
  13. #dump to file
  14. mysqldump –udatabaseusername –p databasename > databasename.sql
  15.  
  16. #import dump
  17. mysql –unewdatabaseusername –p newdatabasename < olddatabasename.sql
  18.  
  19. #exlude table and show outout
  20. mysqldump -v --ignore-table=breo_hybrid.visitorLog -u breo_shop -p breo_hybrid > test_hybrid.sql

Report this snippet  

You need to login to post a comment.