Advertisement
Guest User

Untitled

a guest
May 28th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. USER="myuser"
  4. PASSWORD="mypassword"
  5.  
  6. tables=`mysql --user=$USER --password=$PASSWORD -e "SELECT CONCAT(table_schema,'.',table_name) FROM information_schema.tables WHERE table_schema NOT IN ( 'information_schema', 'performance_schema', 'mysql' );"`
  7.  
  8. for table in $tables; do
  9. echo $table
  10. `mysql --user=$USER --password=$PASSWORD -e "ALTER TABLE $table ENGINE=MyISAM;"`
  11. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement