MySQL同步前的准备工作

| No Comments | No TrackBacks

1.把windows-based MySQL转换为Linux-Based
2.测试兼容性
3.设定监控脚本

第一条的问题在于,当时在运营服务器上测试漏洞,我绕过安全机制插入了几条数据,结果格式不规范...直接从windows2linux会失败,先dump出来再dump进去也不行,如果全程使用navicat也就失去了linux的意义,而且在数据量很大的情况下,远程使用navicat执行insert操作也是很让人崩溃的一件事情。
当然关键还是大小写转换...
第二条兼容性貌似也要算上大小写吧...windows应用环境不区分大小写,但是Linux是区分的。
转换脚本有两个

  • strupper.sed
  • transform.sh


transform.sh代码如下:

#!/bin/bash
cp $1 $1.bak
sed -f strupper.sed -i $1

strupper.sed代码如下:

#!/bin/bash
#This is a STRUPPER bash shell for web database
#Powered by suchasplus
#$20071108

#Example
#Exec this line will replace $123456 with $654321
#

No TrackBacks

TrackBack URL: http://blog.suchasplus.com/mt/mt-tb.cgi/151

Leave a comment

About this Entry

This page contains a single entry by suchasplus published on November 27, 2007 9:53 AM.

让MySQL只监听localhost was the previous entry in this blog.

RHEL4.3 x86_64下bugzilla简略配置指南 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.2.7