immvp 2015-8-11 08:44
要如何 Dumping MySQL Stored Procedures, Event and Triggers?
MySQL 5 有一些新的特性像 stored procedures and event triggers. 如果要將資料庫複製一份還要保留原本這些屬性. 那就需要使用 mysqldump.<br><br>--routines -> FALSE by default<br>--event -> FALSE by default<br>--triggers -> FALSE by default<br><br>如果只用到 routines and event .那麼 Dump 語法:<br>[quote]<br>mysqldump <other mysqldump options> <font color="Red">--routines --event </font>> /tmp/outputfile.sql<br>[/quote]<br><br>匯入的話就照正常的語法:<br>[quote]<br>mysql db < /tmp/outputfile.sql<br>[/quote]<br><br>這樣就可以囉...<br><br>