Knowledge Walls
John Peter
Pune, Maharashtra, India
Mysqldump routines without definer in Linux
11578 Views
Example
mysqldump -u root -pmysql db_name --routines | sed 's/DEFINER=`root`@`localhost`//g' > dump.sql
Hints 
mysqldump -u root -pmysql db_name --routines
To take dump of the database and sed command is used to find and replace in a file.


sed 's/find-text/replace-text/g'
/g - means replace all matches
find and replacing DEFINER=`root`@`localhost` from dump file then create's dump.sql using > dump.sql expression

Best Lessons of "MySQL"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details