查看完整版本: 要如何 Dumping MySQL Stored Procedures, Event and Triggers?


immvp 2015-8-11 08:44

要如何 Dumping MySQL Stored Procedures, Event and Triggers?

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