MySQL表結構比對更新工具 - sqlupdate
sqlupdate 讀取 MySQL 的表定義 SQL 文件(tables.sql),然后與現有數據庫中進行比較,然后生成更新數據庫結構的 SQL 語句。
sqlupdate v1.6.5 - Copyright (C) Joel Yliluoma (http://iki.fi/bisqwit/)
Usage:
sqlupdate [options] >changes.sql
(Creates an update script)
Options:
-t tablefile Describes the file containing
the new sql layout. Default: tables.sql
-d database Default: winnie3
-h host Default: localhost
-u user Default: root
-i Use CREATE INDEX instead of ALTER..ADD KEY
-m Add comments explaining the differences
-c Ignore character set differences
-p pass
-r Reverse operation. (new->old)
Example:
./sqlupdate -t etimgr.sql -d etimgr | mysql -uroot
This program does not update a database. It only
produces update scripts (which show the differences). 本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!