Below is the shell script to alter multiple tables.
#!/bin/bash
DATABASENAME="DBNAME"
for t in `echo "show tables" | mysql --batch --skip-column-names $DATABASENAME`;
do mysql $DATABASENAME -e "ALTER TABLE $t ENGINE=NDBCLUSTER";
done
#!/bin/bash
DATABASENAME="DBNAME"
for t in `echo "show tables" | mysql --batch --skip-column-names $DATABASENAME`;
do mysql $DATABASENAME -e "ALTER TABLE $t ENGINE=NDBCLUSTER";
done
No comments:
Post a Comment