How can we do mysqldump to another DB using php script such that triggers do not get dumped along with that?
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.
Something like this should work:
Then to import:
Note that the new database will need to be created first. You will also probably need to specify a username and password to each command.
edit
You could also do this in one command e.g.