Mysql如何讀.frm結尾的表結構定義檔案
用mysqlfrm工具讀.frm結尾的表結構定義檔案
到網站下載rpm包
上傳到mysql伺服器上
[root@test ~]# rpm -ivh mysql-utilities-1.6.5-1.el6.noarch.rpm
warning: mysql-utilities-1.6.5-1.el6.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
mysql-connector-python >= 2.0.0 is needed by mysql-utilities-1.6.5-1.el6.noarch
發現有依賴關係。
再下載mysql-connector-python
[root@test ~]# rpm -ivh mysql-connector-python-2.1.7-1.el6.x86_64.rpm
warning: mysql-connector-python-2.1.7-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-connector-python ########################################### [100%]
[root@test ~]# rpm -ivh mysql-utilities-1.6.5-1.el6.noarch.rpm
warning: mysql-utilities-1.6.5-1.el6.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-utilities ########################################### [100%]
安裝成功。
[root@test ~]# mysqlfrm /data/mysql/pou_prepub/temp_point_up.frm
Usage: mysqlfrm --server=[user[:<pass>]@host[:<port>][:<socket>]|<login-path>[:<port>][:<socket>]] [path\tbl1.frm|db:tbl.frm]
mysqlfrm: error: The --port option is required for reading .frm files in the default mode.
[root@test ~]# mysqlfrm --diagnostic /data/mysql/pou_prepub/temp_point_up.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 /data/mysql/pou_prepub/temp_point_up.frm:
# The .frm file is a TABLE.
# CREATE TABLE Statement:
CREATE TABLE `pou_prepub`.`temp_point_up` (
`sum(point)` decimal(41,0) DEFAULT NULL,
`member_id` bigint(20) NOT NULL comment '會員ID'
) ENGINE=InnoDB;
#...done.
讀出了.frm的資訊。
到網站下載rpm包
上傳到mysql伺服器上
[root@test ~]# rpm -ivh mysql-utilities-1.6.5-1.el6.noarch.rpm
warning: mysql-utilities-1.6.5-1.el6.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
mysql-connector-python >= 2.0.0 is needed by mysql-utilities-1.6.5-1.el6.noarch
發現有依賴關係。
再下載mysql-connector-python
[root@test ~]# rpm -ivh mysql-connector-python-2.1.7-1.el6.x86_64.rpm
warning: mysql-connector-python-2.1.7-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-connector-python ########################################### [100%]
[root@test ~]# rpm -ivh mysql-utilities-1.6.5-1.el6.noarch.rpm
warning: mysql-utilities-1.6.5-1.el6.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-utilities ########################################### [100%]
安裝成功。
[root@test ~]# mysqlfrm /data/mysql/pou_prepub/temp_point_up.frm
Usage: mysqlfrm --server=[user[:<pass>]@host[:<port>][:<socket>]|<login-path>[:<port>][:<socket>]] [path\tbl1.frm|db:tbl.frm]
mysqlfrm: error: The --port option is required for reading .frm files in the default mode.
[root@test ~]# mysqlfrm --diagnostic /data/mysql/pou_prepub/temp_point_up.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 /data/mysql/pou_prepub/temp_point_up.frm:
# The .frm file is a TABLE.
# CREATE TABLE Statement:
CREATE TABLE `pou_prepub`.`temp_point_up` (
`sum(point)` decimal(41,0) DEFAULT NULL,
`member_id` bigint(20) NOT NULL comment '會員ID'
) ENGINE=InnoDB;
#...done.
讀出了.frm的資訊。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22996654/viewspace-2146995/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Mysql】Mysql從frm檔案裡恢復表結構MySql
- mysql 從 frm 檔案恢復 table 表結構的3種方法MySql
- 通過替換frm檔案方式修改表結構
- mysql程式碼閱讀-frm檔案格式解析MySql
- MySQL資料庫的frm、MYI、MYD檔案意義MySql資料庫
- windows 以bat結尾的檔案WindowsBAT
- 表`t`的INODE結構檔案分析
- 類檔案結構_class類檔案的的結構
- 如何從MySQL全庫備份的dump檔案中恢復某張表和表結構MySql
- EXE檔案結構及讀取方法
- PE檔案結構(四) 輸出表
- mysql中不輸出表頭和結尾的方法MySql
- 表`t`的XDES Entry結構檔案分析
- linux 刪除 .ts 結尾的所有檔案Linux
- 控制檔案的結構
- mysql 如何複製表結構和資料MySql
- MySQL 複製表結構MySql
- mysql表結構複製MySql
- mysql中複製表結構的方法小結MySql
- Delphi重定義的訊息結構
- clickhouse如何表結構
- 【01】把 Elasticsearch 當資料庫使:表結構定義Elasticsearch資料庫
- nginx 匹配.zip .apk 結尾的檔案 直接下載 如果無字尾檔案怎麼匹配?NginxAPK
- BMP檔案結構
- 讀取SQL Server 表結構SQLServer
- Shell 批量重新命名以“.log”結尾的檔案
- 線上重定義拷貝表結構的NOT NULL約束問題Null
- 資料結構:順序結構和鏈式結構的資料型別定義資料結構資料型別
- 關於goldengate 對源表和目的表的表結構一致的定義Go
- Go 專案配置檔案的定義和讀取Go
- iovec結構體定義及使用結構體
- 對應定義結構獲取
- 如何定義Xsd檔案
- Java讀取以.xlsx結尾的excel檔案,並寫出每張表對應的c#類、java類、儲存資料的xml檔案、讀取xml檔案的工具類JavaExcelC#XML
- 從一份定義檔案詳解ELK中Logstash外掛結構
- sqlite中存放自定義表結構的位置SQLite
- Mysql匯出表結構、表資料MySql
- 恢復MySQL InnoDB表結構的方法MySql