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数据库改名相关推荐
- mysql 大小写 if_【已解决】Windows下 MySQL大小写敏感 解决方案及分析
Windows下 MySQL大小写敏感配置 zoerywzhou@163.com 作者:Zhouwan 2017-3-27 最近在window系统下 操作Linux系统下创建的数据库,发现有些不对劲, ...
- 已解决Auto-GPT本地部署正确设置谷歌Google浏览器配置
已解决Auto-GPT本地部署时无法连接Google的问题和无法连接openai的问题抛出异常:SYSTEM: Command goodle returned:Error: [WinError 100 ...
- brew下载的mysql卸载_【已解决】Mac中如何彻底卸载之前通过dmg安装的mysql
折腾: 期间,需要去彻底卸载掉,mac中之前通过dmg安装的mysql mac uninstall mysql dmg➜ ~ ps -ax | grep mysql 28394 ?? ...
- mac下mysql不支持中文_解决mac下mysql无法使用中文的问题
MySQL.png 针对 mac 系统下 mysql 无法使用中文,在网上查找解决办法,大部分都是将 mysql 下的 default.cnf 复制到 /etc下并修改为 my.cnf 然后对文件进行 ...
- plsql备份还原oracle数据库,(已实践)PLSQL本地还原Oracle数据库dmp文件
这个方法很烂,导致重装Oracle时候处处出现问题,不建议使用这个方法,除非你以后不再用Oracle这个软件了,这个方法很烂,再评论一下. 第一,启动服务,(如果数据库处于启动状态,那么略过这一步) ...
- mysql返回页面乱码java_解决Java程序使用MySQL时返回参数为乱码的示例教程
先说MySQL的字符集问题.Windows下可通过修改my.ini内的 default-character-set=utf8 //客户端的默认字符集 在MySQL客户端工具中输入 SHOW VARIA ...
- mysql数据库已连接数据库_001. 【已解决】Java连接MYSQL 数据库的连接步骤
这篇文章主要以MySQL为例讲下Java如何连接到数据库的. 当然,首先要安装有JDK(一般是JDK1.5.X).然后安装MySQL,这些都比较简单,具体过程就不说了.配置好这两个环境后,下载JDBC ...
- oracle数据库12154,PL/SQL登录Oracle数据库报错ORA-12154:TNS:无法解析指定的连接标识符已解决(本地未安装Oracle需要连接服务器上的)...
ORA-12154:TNS:无法解析指定的连接标识符 ORA-12154:TNS:无监听程序 错误分析一.PL/SQL 客户端登录到数据库,如果配置错误会有以上错误,如下图. 这个错误主要是pl/sq ...
- 已解决:mac下Chrome浏览器保存密码后无法填充
问题阐述: 每次登陆不同网页输入密码后,点击保存,再次登陆时无法填充 解决方法: 关闭浏览器后 删除 Google/Chrome/Default下的Login Data , Login Data-jo ...
- php返回mysql错误语句_[已解决]php查询mysql返回了错误的结果
大约是不支持中文字符的原因:将mysql的所有属性都改成英文字符之后,使用mysql好了. 但是! 用mysqli写 还是会返回空(又测了下,密码框不输入或输入0都会得到登录成功的提示) 都明白了 r ...
最新文章
- 03Spring_bean的创建和作用域以及生命周期
- Node.js基金会官方的开发者认证准备就绪
- python从右向左第三个_Python字符串操作,通过查找右括号到左括号来删除内容
- K8S部署工具:KubeOperator集群规划-手动模式
- windows消息机制和Linux,Windows消息机制初谈 (转)
- FPGA 资料搜集记录
- 路径还原(求两个点之间最短距离的路径)
- list(链表)容器
- 用Windows Live Writer写51cto博客
- DDraw笔记-创建表面
- TP5的类似TP3使用‘DEFAULT_THEME’的配置修改主题风格的方法,以及常见模板错误...
- java与数据库连接教程_Java与数据库连接教程
- 传奇新增物品和装备的内观外观及特效Pak文件详解
- carry函数在C语言中用法,常考词的语法与用法:careless, carry, case
- 如何找到合适的分辨率-电脑扩展屏分辨率低
- 巨杉数据库SCDP认证考试答案
- 编译原理复习 第一章 概述
- 800 8107.79
- 修改 IDEA 中 @author 默认值
- LVS+Keepalived之DR模式配置
热门文章
- 如何解决用伪元素点击下拉列表触发不了事件的问题
- 如何在bootstap中修改checkbox的样式
- 苹果雪豹操作系统正式版_iOS 12.3.1正式版“意外”推送,iPhone修复诸多问题!...
- tensor flow lstm 图像 一条直线_【开源计划】图像配准中变形操作(Warp)的pytorch实现...
- 通过调色板(QPalette)将readonly为true的QLineEdit颜色设置为灰色
- 计算机考研一些常纹面试知识,2020年光学工程考研复试真题和技巧
- 关于如何查看mysql版本及其端口号
- Koa nuxt最佳实践前篇
- Eclipse使用添加tomcat后,默认部署目录不是tomcat/webapps,修改方法如下
- 直流UPS的研究和应用前景