0

I'm working on importing some large mysql database backup files that I downloaded from my live server into my local wampserver. The files were compressed in bunzip2 format and have bz2 file extensions. I used to have bunzip setup for my old apache2triad setup, but can't figure out where the bunzip2.exe file needs to go in wampserver.

I obtained the bzip files from http://gnuwin32.sourceforge.net/packages/bzip2.htm, found the bunzip2.exe file in my installation at C:\Program Files (x86)\GnuWin32\bin, but can't find any documentation online of where to set this up for wampserver so that I can execute these mysql commands properly from my command prompt.

D:\wamp\bin\mysql\mysql5.7.11\bin>bunzip2 < D:\path-to-mysql-backup-files\dbbackupfile.sql.bz2 | mysql.exe -u myusername -p mydatabasename 'bunzip2' is not recognized as an internal or external command, operable program or batch file.

Thanks in advance!

EDIT: Figured out the issue thanks to http://windowsitpro.com/powershell/using-bzip2-compression-cmdexe-and-powershell - The bunzip2.exe file I had in my mysql/bin folder needed to be copied to bzip2.exe and bzcat.exe. Once I did this, everything worked fine. Odd that bzip2 doesn't appear to be commonly used with wampserver installations. It's awesome for file compression/decompression, especially when dealing with legacy MySQL data tables that are over 3GB each that contain forum related posts dating back to 2006.

Seibertron
  • 33
  • 1
  • 6
  • Try [7ZIP](http://www.7-zip.org/download.html) its really easy to use. Unzip the files using this and then IMPORT the unzipped file to your database – RiggsFolly Oct 18 '16 at 15:48
  • Thank you for the suggestion. However, I need to find out how to setup bunzip2 with wampserver in order to come up with a proper solution. – Seibertron Oct 18 '16 at 16:53
  • Then start by making sure you have MSVC Runtime `msvcp60.dll` installed from [Microsofts download site](https://www.microsoft.com/en-us/download/details.aspx?id=24417) – RiggsFolly Oct 18 '16 at 18:12
  • Can you explain what that will do for this? I don't recall having to install that when I have set this up previously, though it's been about 6 or 7 years since last I did this. I found a bzip2.dll file, which I installed in my C:\Windows\SysWOW64 folder, and I put the bunzip2.exe file in my mysql5.7.11/bin folder and my apache2.4.18/bin folder due to being unsure where it needed to go. However, now I receive a different error: "The procedure entry point BZ2_bzRead could not be located in the dynamic link library D:\wamp\bin\mysql\mysql5.7.11\bin\bunzip2.exe" – Seibertron Oct 18 '16 at 18:57
  • @RiggsFolly ... I think I installed MSVC Runtime (tried it several times but never got a prompt confirming a success or error at end of install process). Rebooted, tried again, same error as mentioned in previous post: "The procedure entry point BZ2_bzRead could not be located in the dynamic link library D:\wamp\bin\mysql\mysql5.7.11\bin\bunzip2.exe" – Seibertron Oct 18 '16 at 20:03
  • Figured out the issue thanks to http://windowsitpro.com/powershell/using-bzip2-compression-cmdexe-and-powershell The bunzip2.exe file I had in my mysql/bin folder needed to be copied to bzip2.exe and bzcat.exe. Once I did this, everything worked fine. Odd that bzip2 doesn't appear to be commonly used with wampserver installations. It's awesome for file compression/decompression, especially when dealing with legacy MySQL data tables that are over 3GB each that contain forum related posts dating back to 2006. – Seibertron Oct 18 '16 at 21:28

0 Answers0