This article is a bit of a trick that we’ll do a lot of times around the database structure and then import into another MySQL. In the process of importing and exporting, many students will find that the comments in the stored procedure are lost. Although the loss of comments does not affect the execution of the stored procedure, it is more troublesome for the subsequent maintenance (after a period of time, I do not know what I wrote). Now I’m going to show you a little trick, if you keep comments in stored procedures.
- Keep stored procedure comments when exporting
mysqldump -U login name-P password-R to the outgoing database>exportsqlFile locationCopy the code
- Keep stored procedure comments when importing
mysql -U login name-P password-D Database name-c <sqlFile locationCopy the code