How to include functions and procedures when importing a MySql database from another server using mysqldump?

0

I am moving my application to AWS. I have a mysqldump file of my database from the original server that includes table, views, functions and procedures. When I try to import the file into the RDS, only the tables and views are imported. I get an error about needing super privileges and the functions and procedures are not imported. I followed the instructions found in the article: https://repost.aws/knowledge-center/rds-mysql-functions. I set the log_bin_trust_function_creators=1 and I am now able to create new function and procedures but I still get the same error trying to import them.

I have tried using the command line and My SQL Workbench and get the same error.

How can get a complete database import. I verified that everything is included in the mysqldump file by importing it back into a new database on the same existing server and everything is there.

2개 답변
0
수락된 답변

I don't have experience with this, but is this something the Schema Conversion Tool would recreate for you? Just a thought.

profile pictureAWS
전문가
kentrad
답변함 일 년 전
  • Good suggestion. However That tool is used when moving from day MS SQL to MySQL

  • Thanks for the info but in my case the schemas are the same.

0

Afraid you have to do this manually

Make sure to create any stored procedures, triggers, functions, or events manually in your Amazon RDS database. If you have any of these objects in the database that you are copying, exclude them when you run mysqldump. To do so, include the following arguments with your mysqldump command: --routines=0 --triggers=0 --events=0.

profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠