Advertisement
Guest User

Untitled

a guest
Mar 14th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/bin/sh
  2. mysql -u'user' -p'pwd' -D'db' </var/www/vhosts/mydomain/httpdocs/optimize.sql
  3.  
  4. OPTIMIZE TABLE `this_table`
  5.  
  6. #!/bin/sh
  7. mysql -u'user' -p'pwd' -D'db' </var/www/vhosts/mydomain/httpdocs/truncate.sql
  8.  
  9. TRUNCATE TABLE `this_table`
  10.  
  11. #!/bin/sh
  12. echo "truncate table this_table" | mysql -u'user' -p'pwd' -D'db'
  13.  
  14. nano .my.cnf
  15.  
  16. [mysql]
  17. user=your_user
  18. password=the_super_secret_password
  19.  
  20. #!/bin/bash
  21. `mysql --defaults-file=/path/to/.my.cnf -e "truncate table this_table;"`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement