Cutting a Table out of a mysqldump output file

I was restoring the backup of a MySQL 5.x server into MySQL 8.x server – and found out that it corrupt the MySQL 8.x ‘s mysql table

Which stores the usernames and passwords.

So I had to delete the mysql table from the backup, before trying to restore it again

Turn out it’s pretty easy, just will take some time since it’s a pretty big backup :

# search for beginning of 'mysql' table
cat backup.mysql | grep -n Current Database: `mysql`

# 155604:-- Current Database: `mysql`

# search for ending of 'mysql' table
tail -n +155604 backup.mysql | grep -n "Current Database"

# 1:  -- Current Database: `mysql`
# 916:-- Current Database: `phpmyadmin`

# cut that table out
head -155603 backup.mysql                > new.mysql
tail -n +$(( 155603+916 )) backup.mysql >> new.mysql

# voila !

88 thoughts on “Cutting a Table out of a mysqldump output file

  1. Great article. It is very useful and informative. Thanks a lot for sharing this post. – best tile store in chennai

  2. Awesome Blog! It’s a great spot to find new information. Thank you so much for this wonderful article. – shirdi flight packages from chennai

  3. Awesome Blog! It’s a great spot to find new information. Thank you so much for this wonderful article. – tile showroom in chennai

  4. Nice info. This is very impressive post, Very useful information, it clarified things a lot for us. Thanks for sharing valuable tips. – best tile store in chennai

  5. Terima kasih atas informasi yang diberikan.
    Izin kami beri informasi seputar mesin usaha untuk jualan bensin eceran.
    Mesin pom mini digital.
    Pengiriman ke seluruh Indonesia.
    Info : 082311159791
    Harga Pom Mini

  6. What i do not realize is in fact how you are no longer actually much more wellfavored than you might be right now Youre very intelligent You recognize thus considerably in relation to this topic made me in my view believe it from numerous numerous angles Its like men and women are not fascinated until it is one thing to do with Lady gaga Your own stuffs excellent All the time handle it up

  7. you are in reality a just right webmaster The site loading velocity is incredible It seems that you are doing any unique trick In addition The contents are masterwork you have performed a wonderful task on this topic

  8. I liked it as much as you did. Even though the picture and writing are good, you’re looking forward to what comes next. If you defend this walk, it will be pretty much the same every time.

  9. Thank you for the auspicious writeup It in fact was a amusement account it Look advanced to more added agreeable from you By the way how could we communicate

  10. What i dont understood is in reality how youre now not really a lot more smartlyfavored than you might be now Youre very intelligent You understand therefore significantly in terms of this topic produced me personally believe it from a lot of numerous angles Its like women and men are not interested except it is one thing to accomplish with Woman gaga Your own stuffs outstanding Always care for it up

  11. upysm.com ????????????????????????????Instagram?Facebook?Youtube?????????????????????????????????????????????????????????????

  12. certainly like your website but you need to take a look at the spelling on quite a few of your posts Many of them are rife with spelling problems and I find it very troublesome to inform the reality nevertheless I will definitely come back again

  13. Ive read several just right stuff here Certainly price bookmarking for revisiting I wonder how a lot effort you place to create this kind of great informative website

  14. I loved as much as you will receive carried out right here The sketch is tasteful your authored subject matter stylish nonetheless you command get got an edginess over that you wish be delivering the following unwell unquestionably come further formerly again as exactly the same nearly very often inside case you shield this hike

  15. Ive read several just right stuff here Certainly price bookmarking for revisiting I wonder how a lot effort you place to create this kind of great informative website

  16. hello!,I like your writing very so much! proportion ?????????????? we keep up a correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  17. pg slot I really like your forum. There is also an imcvcvportant story in case you don’t want to miss can apply at slotgxy888SLOTPG

  18. hello!,I like your writing very so much! proportion we keep up a ??????????789 correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  19. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next week, and I ajm789 am at the search for such info.

  20. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in this goatclub888 space to unravel my problem. May be that is you! Taking a look forward to see you.

  21. Thanks for another excellent post. Where else may anyone get that kind of information in such an kabet555 ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  22. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? ????? ??????? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  23. hello!,I fifa-louis99 like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  24. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is ?????????????? you! Taking a look forward to see you.

  25. hello!,I like your writing ????? ??? ??? very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in this space to unravel my problem. May be that is you! Taking a look forward to see you.

  26. Every time I read one of your posts, I come away with something new and interesting to think about. Thanks for consistently putting out such great content!

  27. Nice blog here! Also your site loads up fast! What host are you using? Can I get your affiliate link to ??????? pg777 your host? I wish my web site loaded up as quickly as yours lol

  28. I enjoy looking through an article that can make men and women think. Also, thank you for allowing for me to ????? comment!

  29. Wonderful web site. Lots of useful info here. I’m sending it to a few friends ans additionally sharing in delicious. And obviously, gaojing888 thanks to your effort!

  30. Hi gaojing888 there, You have done an incredible job. I’ll certainly digg it and personally suggest to my friends. I’m sure they will be benefited from this site.

  31. Wonderful web site. Lots of useful info here. I’m sending it to a few friends ans additionally sharing in delicious. And gaojing888 obviously, thanks to your effort!

  32. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next ???????????? week, and I am at the search for such info.

  33. Hi there, You have done an incredible job. ??????? I’ll certainly digg it and personally suggest to my friends. I’m sure they will be benefited from this site.

  34. Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next week, and ????????????? I am at the search for such info.

  35. Wonderful web site. Lots of useful ???????? info here. I’m sending it to a few friends ans additionally sharing in delicious. And obviously, thanks to your effort!

  36. Wonderful web site. Lots ???????????? of useful info here. I’m sending it to a few friends ans additionally sharing in delicious. And obviously, thanks to your effort!

  37. Nice blog here! Also your site loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my web site ???????? loaded up as quickly as yours lol

  38. Thanks for another excellent post. Where else may anyone get that kind of information in such an ???????? ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  39. Thanks for another excellent post. ??????????? Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.

  40. Hi there, You have done an incredible job. I’ll certainly digg it and personally ????? pdf suggest to my friends. I’m sure they will be benefited from this site.

  41. hello!,I like your writing very so much! proportion we keep up a correspondence extra approximately your post on AOL? I need an expert in ?????18+ this space to unravel my problem. May be that is you! Taking a look forward to see you.

  42. ????????????????? 3D online video slots games, beautiful graphics, attractive to play, with many games to choose from PGSLOT, the main website that offers PG slots games, the latest in 2023, new open slots websites. Play slot games anywhere through the website. slotgxy888 Sign up for free

  43. Wonderful web site. Lots of useful info here. I’m sending it to a gaojing888 few friends ans additionally sharing in delicious. And obviously, thanks to your effort!

  44. PG online slots website 2024. free registration, free credit to play online slots Free registration given slotgxy888 PG ????? ????????

  45. SLOT PG get real money n all forms From foreign websites, foreign countries, including all the camps that make slots the easiest to crack, all in one website. ????? ????

Leave a Reply

Your email address will not be published. Required fields are marked *