日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql 数据库名字 mac,【已解决】Mac本地给mysql数据库改名

發布時間:2023/12/15 数据库 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql 数据库名字 mac,【已解决】Mac本地给mysql数据库改名 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

折騰

期間,需要去備份在線mysql,恢復導入到Mac本地的mysql

但是同時保留Mac本地之前的mysql的數據庫,用于對比查找問題

所以需要去:

mysql 數據庫 改名

mysql database rename

感覺此處還是用mysqldump比較省事。

去看看:

mysqldump -R old_db | mysql new_db

【總結】

此處Mac中本地mysql去改名,最簡單的還是:mysqldump -u username -p -v olddatabase > olddbdump.sql

mysqladmin -u username -p create newdatabase

mysql -u username -p newdatabase < olddbdump.sql

詳細過程:???mysql_backup_restore mysqldump -uroot -pcrifan_mysql -v naturling > local_mysql_naturling.sql

mysqldump: [Warning] Using a password on the command line interface can be insecure.

-- Connecting to localhost...

-- Retrieving table structure for table auth_group...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table auth_group_permissions...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table auth_permission...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table django_admin_log...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table django_content_type...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table django_migrations...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table django_session...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table django_site...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table enum_value_dict...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table keyword...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table keyword_rel...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table media...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table media_keyword_rel...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table media_scene_rel...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table qa...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table qa_keyword_rel...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table qa_scene_rel...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table scene...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table scene_keyword_rel...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table script_dialog...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table script_history...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table script_review...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table script_script...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table thesaurus...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table user_functiongroup...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table user_functiongroup_members...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table user_user...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table user_user_groups...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving table structure for table user_user_user_permissions...

-- Sending SELECT query...

-- Retrieving rows...

-- Disconnecting from localhost...

???mysql_backup_restore ll

total 67624

-rw-r--r--??1 crifan??staff????33M??7 25 10:07 local_mysql_naturling.sql

???mysql_backup_restore mv local_mysql_naturling.sql local_mysql_naturling_180725.sql

???mysql_backup_restore ll

total 67624

-rw-r--r--??1 crifan??staff????33M??7 25 10:07 local_mysql_naturling_180725.sql

???mysql_backup_restore mysqladmin -uroot -pcrifan_mysql create naturling_local

mysqladmin: [Warning] Using a password on the command line interface can be insecure.

???mysql_backup_restore mysql -uroot -pcrifan_mysql naturling_local < local_mysql_naturling_180725.sql

mysql: [Warning] Using a password on the command line interface can be insecure.

即可。

總結

以上是生活随笔為你收集整理的mysql 数据库名字 mac,【已解决】Mac本地给mysql数据库改名的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。