Sometimes I write comments in MySQL stored procedure, but after database recovery, all the comments are lost. How to prevent comments lost? Thanks!
Sometimes I write comments in MySQL stored procedure, but after database recovery, all the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a common problem with the mysql CLI. By default, it strips out all the comments from the SQL restore file.
Use –comments on the command line to prevent mysql CLI from stripping out the comments. Works for me.
eg. mysql mydb -u root -ppassword –comments < /tmp/db_to_restore.sql