Wednesday, March 25, 2020

mysqldump

#dump
mysqldump -uroot -p database -r utf8.dump

#dump the schema
mysqldump -uroot -p --no-data database -r utf8.dump

#import
mysql -uroot -p --default-character-set=utf8 database
mysql> SET names 'utf8'
mysql> SOURCE utf8.dump

No comments:

Post a Comment

Git get all remote branches

git branch -r \ | grep -v '\->' \ | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \ | while read remote; do \ git branc...