Backup Data only: mysqldump -u root -p --protocol=tcp --port=3306 --default-character-set=utf8 --single-transaction=TRUE --skip-triggers DATABASE -t table1 -t table2 -t table3 > data.sql Backup Structure only: mysqldump --no-data -u root -p Database table1 table2 ... > str.sql Backup Data and Structure : mysqldump -u root -p Database -t table -t table ... > data&struk.sql Backup Structure view only: mysql -h hosts -u usernonroot -ppassword --skip-column-names --batch -e "select concat('drop table if exists ', table_schema, '.', table_name,'; create or replace view ', table_schema, '.', table_name, ' as ', view_definition, '; ') as q from information_schema.views where table_schema = 'DATABASE_NAME' " > views.sql && sed -i 's/usernonroot/usernonrootnew/g' views.sql Backup Procedure and Function Only: mysqldump -u root -p -single-transaction=TRUE --routines --no-data --no-create-info=TRUE...
catatan pengetahuan hasil emak emak