LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   load mysql data file error (https://www.linuxquestions.org/questions/linux-software-2/load-mysql-data-file-error-4175637817/)

catiewong 09-05-2018 05:13 AM

load mysql data file error
 
sorry to ask mysql question here , as I know many linux user use mysql db .

In my mysql 5.7.x , there is a db with function , trigger , stored procedure .

I follow the below URL to export the data with the command "mysqldump -u root -p --routines mydb > mydb.sql" , but I got the error "ERROR 1359 (HY000) at line 1541: Trigger already exists" when load into a empty db

Would advise what is wrong in my step , how to fix it ?


https://tecadmin.net/mysql-dumpresto...-and-triggers/

scasey 09-05-2018 10:27 PM

What command did you execute to do the load?

What's on line 1541 of the dump file?

Habitual 09-07-2018 03:33 PM

Aren't triggers stored in the mysql table and not the db for the <whatever>?
Seems they are in INFORMATION_SCHEMA db.

How are triggers managed in mysql 5.7 sayeth:
"Information about triggers can be obtained by querying the INFORMATION_SCHEMA.TRIGGERS table. See Section 24.29, “The INFORMATION_SCHEMA TRIGGERS Table”."
I think perhaps your dump syntax may be from a bygone era ;)
See https://dev.mysql.com/doc/refman/5.7...nes-table.html

and https://dev.mysql.com/doc/refman/5.7...on-schema.html


All times are GMT -5. The time now is 05:34 AM.