MariaDB:將資料庫重新命名或匯出匯入資料庫
遷移Table:
mysql -u root -p password olddb -sNe 'show tables' | while read table; \
do mysql -u root -p password -sNe "rename table olddb.$table to newndb.$table"; done
或者使用匯出工具
mysqldump -u root -p -v oldname > oldname.sql
mysqladmin -u root -p create newname
mysql -u root -p newname < oldname.sql
source:https://www.opencli.com/mysql/mysql-mariadb-rename-database
阅读剩余
THE END