$ cd /PATH_TO_MYSQL/bin
$ mysqldump -u USER_NAME_HERE -p OLD_DB_NAME_HERE >~/DUMP_FILE_NAME_HERE.sql
$ mysql -u USER_NAME_HERE -p
mysql> create database NEW_DB_NAME_HERE CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
mysql> use NEW_DB_NAME_HERE
mysql> source ~/DUMP_FILE_NAME_HERE.sql
mysql> drop database OLD_DB_NAME_HERE;
No comments:
Post a Comment