mysql 指令碼暫存

2021-07-07 07:54:51 字數 818 閱讀 7256

//提取表的列資訊,組成類成員基礎資料

use information_schema;

select concat('//',column_comment),concat('public string',column_name) , data_type,column_comment ,column_default from information_schema.columns where table_schema ='資料庫名'  and table_name = '表名'

order by ordinal_position ;

//提取表的列資訊,組成類成員基礎資料,帶注釋

use information_schema;

select concat('/** ',column_comment,' */'),concat('public string ',column_name,'="";') from information_schema.columns where table_schema ='資料庫名'  and table_name = '表名'

order by ordinal_position ;;

//生成rs提取**

use information_schema;

select concat('sku.',column_name,' = rssku.getstring("',column_name,'");') from information_schema.columns where table_schema ='資料庫名'  and table_name = '表名'

order by ordinal_position ;;

磁碟管理 暫存

1 磁碟物理結構資訊 2 磁碟邏輯結構資訊 3.磁碟分割槽操作方法 4 磁碟格式化操作方法 5 磁碟使用方法 1 磁碟物理結構資訊 外部結構資訊 肉眼可見 介面 sata scsi sas 好的介面 類似於茶壺壺嘴 轉速 10k 15k 容量 位元組 kb mb gb tb pb 廠商生產磁碟換算單...

mysql 監控指令碼 監控mysql狀態指令碼

監控mysql狀態,發現宕後,自動重啟,每秒檢查一次。check.sh bin bash while true do bin sleep 1 sh mysql status.sh done chengkill bin sh pid kill thread for chenglee if filefo...

編寫mysql備份指令碼 mysql 備份指令碼的編寫

最近在為做一些邊邊角角的工作,現在有乙個需求要每天把mysql的資料庫dump出來到備份機器上面去.看似簡單的任務也潛在了很多的需求,整理如下 自動執行 crontab 指令碼的環境變數設定 由於通過crontab 啟動執行的指令碼環境變數沒有設定,需要在指令碼中設定環境變數 使用何種方式備份資料庫...