mysql的一个工具 mysql-utilities
mysql-utilities是mysql的一个工具集合,它是基于----- python2 --- 实现的,从官网查看到最新版本为mysql-utilities-1.6.5.tar.gz
编译安装
wget https://cdn.mysql.com/archives/mysql-utilities/mysql-utilities-1.6.5.tar.gz
tar xvf mysql-utilities-1.6.5.tar.gz
cd mysql-utilities-1.6.5
python setup.py build
python setup.py install
mysqldiff --version
1 mysqlfrm 可以抽取frm文件里面的表结构
mysqlfrm 有两种操作模式。默认的模式是再生个实例,使用--basedir选项或指定--server选项来连接到已经安装的实例。这种过程不会改变原始的.frm文件。
该模式也需要指定--port选项来给再生的实例使用,该端口不能与现有的实例冲突。在读取.frm文件后,再生的实例将被关闭,所有的临时文件将被删除的。
另一个模式是诊断模式,--diagnostic 选项。byte-by-byte读取.frm文件 尽可能多的恢复信息。该模式有更多的局限性,不能校验字符集。
当使用默认模式无法读取文件或者该服务器上没有安装MySQL实例就使用诊断模式。
#
/tmp/backup/2019-08-27_17-32-55/dstdata 是通过innodbbackupex备份的目录,first是其中的一个表 [root@localhost mysql-utilities-1.6.5]# mysqlfrm --diagnostic /tmp/backup/2019-08-27_17-32-55/dstdata/first.frm
# WARNING: Cannot generate character set or collation names without the --server option. # CAUTION: The diagnostic mode is a best-effort parse of the .frm file.
As such, it may not identify all of the components of the table correctly.
This is especially true for damaged files. It will also not read the default values for the columns and the resulting statement may not be syntactically correct.
# Reading .frm file for /tmp/backup/2019-08-27_17-32-55/dstdata/first.frm:
# The .frm file is a TABLE.
# CREATE TABLE Statement: CREATE TABLE `dstdata`.`first` (
`id` int(11) DEFAULT NULL,
`name` char(16) DEFAULT NULL
) ENGINE=InnoDB; #...done.
mysql的一个工具 mysql-utilities的更多相关文章
- Mysql抓包工具 - MySQL Sniffer 使用小结 (含带general_log日志)
在mysql运维工作中,一般会使用tcpdump做一些分析(直接读分析日志比较难以看明白,在数据库连接值高时使用):对于mysql实时的连接监控分析,通常会使用"mysqladmin/sho ...
- MySQL服务 - 客户端工具mysql及mysqladmin使用介绍
mysql客户端: mysql工具是MySQL官方提供的连接工具,用户可以通过mysql连接到mysqld上进行一系列的SQL操作.mysql工具有两种模式:交互模式和命令行模式.交互模式指令需要连接 ...
- mysql优化---优化工具MySQL performance tuning primer script
MySQL performance tuning primer script一个简单好用的mysql优化工具,其实一个shell脚本 下载: $ wget http://www.day32.com/M ...
- MySQL闪回工具之binlog2sql
一.binlog2sql 1.1 安装binlog2sql git clone https://github.com/danfengcao/binlog2sql.git && cd b ...
- (5.6)mysql高可用系列——MySQL Utilities 管理工具
关键词:mysql工具集,mysql管理工具,mysql utilities [1]安装mysql utilities cd /download wget https://cdn.mysql.com/ ...
- 6.MySQL图形化工具的使用
6.图形化工具的使用6.1 Mysql Workbench Mysql Workbench是Mysql官方推出的集成图形化工具,替代了之前的图形化管理工具Mysql Administrator和图形化 ...
- MySQL, 创建一个只读用户和一个所有权限用户
安装pasa需要配置mysql.基本知识学习一下 http://www.cnblogs.com/mr-wid/archive/2013/05/09/3068229.html MySQL 为关系型数据库 ...
- MySQL 命令行工具之 mysqldump 深入研究
mysqldump 是MySQL的一个命令行工具,用于逻辑备份.可以将数据库和表的结构,以及表中的数据分别导出成:create database, create table, insert into的 ...
- MySQL的mysqldump工具的基本用法
导出要用到MySQL的mysqldump工具,基本用法是: shell> mysqldump [OPTIONS] database [tables] 如果你不给定任何表,整个数据库将 ...
随机推荐
- centos 6.5 查看发行版本
cat /etc/redhat-release 其他发行版 lsb_release -a
- Struts和Hibernate的jar包
这几天做了一个javaee关于struts框架和Hibernate框架的实践,实践内容倒是没什么,关键是找框架的配置花了许多时间 于是在这里把这两个框架的有关jar上传分享一下 链接: https:/ ...
- CDH6.3.1安装hue 报错
x 一.查看日志server运行日志 /var/log/cloudera-scm-server/cloudera-scm-server.log 2019-12-11 17:28:34,201 INFO ...
- Oracle 部门员工查询
--部门:部门编号,部门名称,地址: --员工:员工编号,员工名字,职务,管理编号,入职日期,薪资,奖金,部门编号: CREATE TABLE dept( deptno INT PRIMARY KEY ...
- sql查看数据库环境及一些参数
sql查看数据库环境及一些参数 select parent_obj from sysobjects where name='FK_Student_banjiID' --根据外键名得到外表id sele ...
- 【Java】java获取json中某个字段
import com.alibaba.fastjson.JSONObject; public class JsonTest { public static void main(String[] arg ...
- LOJ 2302 「NOI2017」整数——压位线段树
题目:https://loj.ac/problem/2302 压30位,a最多落在两个位置上,拆成两次操作. 该位置加了 a 之后,如果要进位或者借位,查询一下连续一段 0 / 1 ,修改掉,再在含有 ...
- NGINX配置之二: nginx location proxy_pass 后面的url 加与不加/的区别.
这里我们分4种情况讨论 这里我们请求的网站为:192.168.1.123:80/static/a.html 整个配置文件是 server{ port 80, server name 192.168.1 ...
- jQuery积累:serialize()、stringify()、toJSON()
*)表单serialize()序列化,和serializeArray() ##)应用场景 当Ajax或者get请求发送表单中的某一个,或者某几个值到后台时,通过jQuery就能获取到这些值.然后作为A ...
- selenium2-java 浏览器下进行登录
完整代码实现如下: package linear; import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;import ...