Bogiecom.com
  • About
  • Magento
  • Sitecore
  • WordPress

Category Archives: Dump Files

Changing SQL Schema in Mysql Dump Files using Powershell

Posted on June 14, 2012 by bc-admin

Quick way to change the schema name in all mysql dump files in a directory using Powershell. Or you could just use it to change a string in files of particular type in a directory

1
2
C:\Users\SloshDev> foreach($f in gci("*.sql")){
              (Get-Content $f.fullname) | %{ $_ -replace "magento_1_9","magento_1_12" } | Set-Content $f.fullname }

Here’s how I changed the default character set from latin1 to utf8. May not want to use if different columns use different character sets.

1
2
3
C:\Users\SloshDev> foreach($f in gci("*.sql")){
      (Get-Content $f.fullname) | %{ $_ -replace "latin1","utf8" } | Set-Content $f.fullname
     }

Posted in Dump Files, MySQL, Powershell | Leave a comment |

Pages

  • About
  • Magento
  • Sitecore
  • WordPress

Archives

  • January 2017
  • December 2013
  • November 2013
  • February 2013
  • January 2013
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • November 2011
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • September 2009

Categories

  • .NET
  • Air Force
  • Apache Configuration
  • Bash
  • C#
  • Comma-Delimited
  • Custom Field Validator
  • Date Format
  • Dump Files
  • Files
  • Grep
  • Grooveshark
  • HTML
  • Image Resizing
  • Imagick
  • Integration
  • jQuery
  • Konami Code
  • Linux
  • Magento
  • Magento Third Party CMS Integration
  • Mini Shuttle
  • Miva Merchant 5.5
  • MySQL
  • PHP
  • Powershell
  • Regular Expressions
  • Rename-Item
  • Sed
  • Shell Scripting
  • Sitecore
  • Strings
  • Uncategorized
  • Updating Product Attributes
  • Video Games
  • Wordpress
  • X-37
  • XML
  • YUI Konami Event

CyberChimps WordPress Themes

© 2008 - 2016 Bogiecom.com