You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bangal...@googlegroups.com
Hi, Thanks for quick help,
MySQLDump works great for the single table: Ex: mysqldump "--where=name='project1" " database1 projects > backup.sql
But it is throwing error when i include another table whichis having foreign key relation with the first table: Ex: mysqldump "--where=projects.name='project1'" "--where=sub_projects.foreignKey=projects.primaryKey" cap_db projects sub_projects > backup.sql
Error Trace:
mysqldump: mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `sub_projects` WHERE sub_projects.foreignKey=projects.primaryKey': Unknown column 'sub_projects.foreignKey' in 'where clause' (1054)
mysqldump: Got error: 1054: Unknown column 'sub_projects.foreignKey' in 'where clause' when retrieving data from server
Is it possible to include two tables which have a foreignkey relation in mysqldump?
Thanks
Subbu
unread,
Jun 9, 2011, 5:24:06 AM6/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bangal...@googlegroups.com, bab...@gmail.com
Why not execute your query within mysql shell and the output the query results to an external file? This way you don't have to use mysqldump.