LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-05-2018, 06:13 AM   #1
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Rep: Reputation: Disabled
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/
 
Old 09-05-2018, 11:27 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,345

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
What command did you execute to do the load?

What's on line 1541 of the dump file?
 
1 members found this post helpful.
Old 09-07-2018, 04:33 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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

Last edited by Habitual; 09-07-2018 at 04:36 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MYSQL Load data infile error slam Linux - Software 2 12-03-2012 12:26 AM
Mysql 'LOAD DATA INFILE' command error talat Programming 3 01-07-2008 10:09 PM
How to load data to tabel in MySql using script maheshdf Linux - Newbie 2 11-30-2006 04:06 AM
mysql - load data warning prabhatsoni Linux - Software 0 06-16-2005 07:08 AM
MySQL Load Data Separators joelhop Linux - Newbie 4 05-15-2004 11:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration