主机名更改后,同步机操作
[
2009/06/01 15:07 | by admin ]
2009/06/01 15:07 | by admin ]
By default, relay log file names have the form host_name-relay-bin.nnnnnn, where host_name is the name of the slave server host and nnnnnn is a sequence number. Successive relay log files are created using successive sequence numbers, beginning with 000001. The slave uses an index file to track the relay log files currently in use. The default relay log index file name is host_name-relay-bin.index. By default, the slave server creates relay log files in its data directory.
The default file names for relay logs and relay log index files can be overridden with, respectively, the --relay-log and --relay-log-index server options (see Section 16.1.3, “Replication and Binary Logging Options and Variables”). For this reason, changing a replication slave's host name can cause replication to fail with the errors Failed to open the relay log and Could not find target log during relay log initialization. This is a known issue which we intend to fix in a future MySQL release (see Bug#2122). If you anticipate that a slave's host name may change in the future (for example, if networking is set up on the slave such that its host name can be modified via DHCP), then you can use these options to prevent this problem from occurring. However, if you encounter this issue, one way to work around it is to stop the slave server, prepend the contents of the old relay log index file to the new one, then restart the slave. On a Unix system, this can be done as shown here, where new_host_name is the new host name and old_host_name is the old one:
shell> cat new_host_name-relay-bin.index >> old_host_name-relay-bin.index
shell> mv old_host_name-relay-bin.index new_host_name-relay-bin.index
The default file names for relay logs and relay log index files can be overridden with, respectively, the --relay-log and --relay-log-index server options (see Section 16.1.3, “Replication and Binary Logging Options and Variables”). For this reason, changing a replication slave's host name can cause replication to fail with the errors Failed to open the relay log and Could not find target log during relay log initialization. This is a known issue which we intend to fix in a future MySQL release (see Bug#2122). If you anticipate that a slave's host name may change in the future (for example, if networking is set up on the slave such that its host name can be modified via DHCP), then you can use these options to prevent this problem from occurring. However, if you encounter this issue, one way to work around it is to stop the slave server, prepend the contents of the old relay log index file to the new one, then restart the slave. On a Unix system, this can be done as shown here, where new_host_name is the new host name and old_host_name is the old one:
shell> cat new_host_name-relay-bin.index >> old_host_name-relay-bin.index
shell> mv old_host_name-relay-bin.index new_host_name-relay-bin.index
星际打不好,是有原因的.比如狗改不了吃屎的懒.
局部小优势就懒得忘记了造兵,忘记了开矿,忘记了撒雷达.结果被一波冲死.
什么左思右想,犹犹豫豫就更不必说啦.
想太多又不见得聪明.这可就悲哀了.
我这人就是不爱关注事物本身,老爱追求一些虚无缥缈的东西.压力,压抑,郁闷自然由此产生啦.
当然这个破鼠标也是祸首之一.NND.真是重死人了.
事情做不好,当然也是有原因的啦.
比如最严重的自我受限和逆反心理.我对你实在是无语了...
这就是所谓的"青年幼稚症".
实在傻.
这个半上不下的可烦人了.
你说完全不懂吧.过得可开心了.
你说完全懂了吧.过得可自在了.
X...@#!$%^*( ..// 卡在中间了
临渊羡鱼,不如退而结网.这什么道理我都懂.就是基因里有个开关没修理好.
NND.一不留神就又溜回去了.
不如把手伸到插座里试试看好了.
X你.你当我傻啊.
前阵子,忙到山无棱,天地合.忙啥,瞎忙呗.搞得闭目养神吭哧哼哧的.这两天,似乎来着有点缓缓的趋势.
这.............一定不是幻觉.
不说啦,不说啦,最近啥子拍照片的图片都没修理.要不又可放两张上来撑撑TABLE的HIGHT....
这下脑残了.12点了.明天又得从床上撕起来....去上....班.............
................
局部小优势就懒得忘记了造兵,忘记了开矿,忘记了撒雷达.结果被一波冲死.
什么左思右想,犹犹豫豫就更不必说啦.
想太多又不见得聪明.这可就悲哀了.
我这人就是不爱关注事物本身,老爱追求一些虚无缥缈的东西.压力,压抑,郁闷自然由此产生啦.
当然这个破鼠标也是祸首之一.NND.真是重死人了.
事情做不好,当然也是有原因的啦.
比如最严重的自我受限和逆反心理.我对你实在是无语了...
这就是所谓的"青年幼稚症".
实在傻.
这个半上不下的可烦人了.
你说完全不懂吧.过得可开心了.
你说完全懂了吧.过得可自在了.
X...@#!$%^*( ..// 卡在中间了
临渊羡鱼,不如退而结网.这什么道理我都懂.就是基因里有个开关没修理好.
NND.一不留神就又溜回去了.
不如把手伸到插座里试试看好了.
X你.你当我傻啊.
前阵子,忙到山无棱,天地合.忙啥,瞎忙呗.搞得闭目养神吭哧哼哧的.这两天,似乎来着有点缓缓的趋势.
这.............一定不是幻觉.
不说啦,不说啦,最近啥子拍照片的图片都没修理.要不又可放两张上来撑撑TABLE的HIGHT....
这下脑残了.12点了.明天又得从床上撕起来....去上....班.............
................
"在彩虹深处 高远的长路
指引儿时临睡前必听的掌故 所描述的那方乐土
在彩虹深处 天蓝如故
曾经狂热的梦想终于驻足
这梦中的国度
终有那么一天
我将在星上许下诺言
并苏醒在云海的另一边
往日的忧愁会像酸楚的柠檬汁水跌落不见
那云端下应是烟囱的帽檐
而你将在那云端之上与我相见
在彩虹深处 蓝鸟飞渡
鸟儿飞进彩虹的深处
为什么到那时 噢 为什么我就不能将彩虹飞渡
如果快乐的小鸟也能飞过彩虹的横亘
为什么 噢 为什么我就不能"
http://v.youku.com/v_show/id_XMTg3NzQxNDQ=.html
指引儿时临睡前必听的掌故 所描述的那方乐土
在彩虹深处 天蓝如故
曾经狂热的梦想终于驻足
这梦中的国度
终有那么一天
我将在星上许下诺言
并苏醒在云海的另一边
往日的忧愁会像酸楚的柠檬汁水跌落不见
那云端下应是烟囱的帽檐
而你将在那云端之上与我相见
在彩虹深处 蓝鸟飞渡
鸟儿飞进彩虹的深处
为什么到那时 噢 为什么我就不能将彩虹飞渡
如果快乐的小鸟也能飞过彩虹的横亘
为什么 噢 为什么我就不能"
http://v.youku.com/v_show/id_XMTg3NzQxNDQ=.html
一个非常好笑的回复.
[
2009/04/21 10:09 | by admin ]
2009/04/21 10:09 | by admin ]
From: PianoPan
"一个单独的python 程序, 使用sys.exit(1), 可以把正确的返回值返回给shell 环境
但是当另外一个python 程序使用os.system("./bin/xxx.py") 这样调用的时候, os.system 的返回值却出现了问题,
变成了256 , 也就是0x100 , 不知道这个问题怎么解决?"
From: 沈
"os.system('./bin/xxx.py') % 255"
From: Ray Stinger
"沈啊,我说你是不是*(&$#^&&!
os.system('./bin/xxx.py') % 255
这也行?算了,你还是进军演艺圈吧..."
_______________________________________________
result >> 8
"一个单独的python 程序, 使用sys.exit(1), 可以把正确的返回值返回给shell 环境
但是当另外一个python 程序使用os.system("./bin/xxx.py") 这样调用的时候, os.system 的返回值却出现了问题,
变成了256 , 也就是0x100 , 不知道这个问题怎么解决?"
From: 沈
"os.system('./bin/xxx.py') % 255"
From: Ray Stinger
"沈啊,我说你是不是*(&$#^&&!
os.system('./bin/xxx.py') % 255
这也行?算了,你还是进军演艺圈吧..."
_______________________________________________
result >> 8
vbs禁用用户Terminal Services属性
[
2009/04/03 09:56 | by admin ]
2009/04/03 09:56 | by admin ]
我最近又从勤劳变成懒惰.书本堆积在那边,翻开两三章就闲置起来.
趁着入睡前倒也把<李敖回忆录>粗粗翻阅一遍,受益匪浅.
看了两三部电影,听了四五首情歌.我的生日又到了.虽说不是真实的生日,却在每年同一时候提醒年华的逝去.
非主流与我的伞一起消失,如路边的风景,哗然而过.搬进来一位能干女性,处事干脆利落,活得自然洒脱.啊哈,以人为镜可以明得失.
有什么是可以值得你放在心上的,没关系,慢慢来,乘桴浮于海.
清明已到.细思量,已非断魂时.
又是春未夏初.
首先.如果从ts account进行阻止的话.
可以阻止rdp-tcp 的登录,如果加上console,其实也可以产生权限不足的效果.遗憾的是,这个关卡只在验证通过用户名密码后进行拦截,因此,假如在本地进行物理登录后,使用console参数可以强行切换到物理进程.
所以可以这样,这种方法依赖关系造成累赘代码太多.
趁着入睡前倒也把<李敖回忆录>粗粗翻阅一遍,受益匪浅.
看了两三部电影,听了四五首情歌.我的生日又到了.虽说不是真实的生日,却在每年同一时候提醒年华的逝去.
非主流与我的伞一起消失,如路边的风景,哗然而过.搬进来一位能干女性,处事干脆利落,活得自然洒脱.啊哈,以人为镜可以明得失.
有什么是可以值得你放在心上的,没关系,慢慢来,乘桴浮于海.
清明已到.细思量,已非断魂时.
又是春未夏初.
首先.如果从ts account进行阻止的话.
Const ALL_ACCESS = 2
CONST LOGOON = 5
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_TSPermissionsSetting")
For Each objItem in colItems
errResult = objItem.AddAccount("Administrator", ALL_ACCESS)
Next
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_TSAccount Where AccountName like '%\\Administrator'")
For Each objItem in colItems
If objItem.PermissionsDenied <> 32 then
errResult = objItem.ModifyPermissions(LOGOON,False)
If errResult = 0 Then
errResult = Chr(9) & "success"
Else
errResult = Chr(9) & "fail!!!!!!" & Chr(13) & Chr(9) & "fail!!!!!!"
End If
MsgBox objitem.AccountName & Chr(13) & errResult
End If
Next
Set objWMIService = Nothing
Set colItems = Nothing
CONST LOGOON = 5
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_TSPermissionsSetting")
For Each objItem in colItems
errResult = objItem.AddAccount("Administrator", ALL_ACCESS)
Next
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_TSAccount Where AccountName like '%\\Administrator'")
For Each objItem in colItems
If objItem.PermissionsDenied <> 32 then
errResult = objItem.ModifyPermissions(LOGOON,False)
If errResult = 0 Then
errResult = Chr(9) & "success"
Else
errResult = Chr(9) & "fail!!!!!!" & Chr(13) & Chr(9) & "fail!!!!!!"
End If
MsgBox objitem.AccountName & Chr(13) & errResult
End If
Next
Set objWMIService = Nothing
Set colItems = Nothing
可以阻止rdp-tcp 的登录,如果加上console,其实也可以产生权限不足的效果.遗憾的是,这个关卡只在验证通过用户名密码后进行拦截,因此,假如在本地进行物理登录后,使用console参数可以强行切换到物理进程.
所以可以这样,这种方法依赖关系造成累赘代码太多.
''ver 0.4
Set wsh3=createobject("wscript.shell")
Set objCmd = wsh3.exec("hostname")
strResult = replace(objCmd.StdOut.Readall(),chr(13),"")
strResult = Replace(strResult,Chr(10),"")
Set Services = GetObject("winmgmts:\\" & strResult & "\root\cimv2").ExecQuery("SELECT * FROM Win32_Service where Name = 'lanmanserver'")
Set objUser = GetObject("WinNT://" & strResult & "/Administrator,user")
For Each Service In Services
If Service.State <> "Running" Then
runonstart = 0
errcode1 = Service.ChangeStartMode("Manual")
wscript.sleep(2000)
errcode2 = Service.StartService()
If errcode + errcode2 <> 0 Then
MsgBox "startservice name 'server' fail.zi ji qu kai!"
wscript.quit
End If
Else
runonstart = 1
End If
wscript.sleep(2000)
objUser.AllowLogon = 0
objUser.SetInfo
If objUser.AllowLogon Then
Msgbox "allow administrator ts service."
Else
MsgBox "closed administrator ts service.",0,"Ok"
End If
If runonstart <> 1 Then
errcode = Service.StopService()
wscript.sleep(2000)
errcode1 = Service.ChangeStartMode("Disabled")
End If
Next
Set wsh3 = Nothing
Set objCmd = Nothing
Set objUser = Nothing
Set wsh3=createobject("wscript.shell")
Set objCmd = wsh3.exec("hostname")
strResult = replace(objCmd.StdOut.Readall(),chr(13),"")
strResult = Replace(strResult,Chr(10),"")
Set Services = GetObject("winmgmts:\\" & strResult & "\root\cimv2").ExecQuery("SELECT * FROM Win32_Service where Name = 'lanmanserver'")
Set objUser = GetObject("WinNT://" & strResult & "/Administrator,user")
For Each Service In Services
If Service.State <> "Running" Then
runonstart = 0
errcode1 = Service.ChangeStartMode("Manual")
wscript.sleep(2000)
errcode2 = Service.StartService()
If errcode + errcode2 <> 0 Then
MsgBox "startservice name 'server' fail.zi ji qu kai!"
wscript.quit
End If
Else
runonstart = 1
End If
wscript.sleep(2000)
objUser.AllowLogon = 0
objUser.SetInfo
If objUser.AllowLogon Then
Msgbox "allow administrator ts service."
Else
MsgBox "closed administrator ts service.",0,"Ok"
End If
If runonstart <> 1 Then
errcode = Service.StopService()
wscript.sleep(2000)
errcode1 = Service.ChangeStartMode("Disabled")
End If
Next
Set wsh3 = Nothing
Set objCmd = Nothing
Set objUser = Nothing






搜索
分类
同游
呓语
链接
统计
来源
喂鱼