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.

已提問 1 年前檢視次數 641 次
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
已回答 1 年前
  • 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
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南