复制代码 代码如下,在运作bat文件就能够了

php代码: 复制代码 代码如下: 复制代码
代码如下: @echo off :BEGIN set /p input=any key to run or “c” exit: if
“%input%”==”c” goto END goto RUN :RUN ..binphp.exe -r “echo
“rnrn”;” ..binphp.exe run.php %input% ..binphp.exe
-r “echo “rnrn”;” goto BEGIN :END exit

@echo off
title autorun专杀工具
color 9A
echo 欢迎使用autorun专杀工具!

n”; echo << END; }else{ die(“no mysql instances defined.”);
}check_status_api.php:复制代码
代码如下:/* * 检查mysql服务器的同步状态 */ function
check_mysql_replication_status($host, $username, $password) {
//默认状态未知 $r = array; try{ $dbh = @mysql_connect($host, $username,
$password); if{ //无法连接 $r[“result”] = -2; return; } $query = “SHOW
SLAVE STATUS”; $res = @mysql_query; $err = @mysql_error{ //无法连接
$r[“result”] = -3; return; } $row = mysql_fetch_array; $r = $row;
if(($r[“Slave_IO_Running”] == “Yes”) && ($r[“Slave_SQL_Running”]
== “Yes”)) { $r[“result”] = 0; }else{ if{ $r[“result”] = 1; }else{
$r[“result”] = 2; } } }catch{ $r[“result”] = -4; } return;
}mysql_instance.php:复制代码
代码如下://GRANT REPLICATION CLIENT ON *.* TO ‘用户名’@’监控主机ip’
IDENTIFIED BY ‘密码’; $mysql_instances = array(); $mysql_instances[]
= “远程ip:端口”;

建一个文档,把下面的全复制进去后,把后缀名txt改为bat
,在运行bat文件就行了

instance result Slave_IO_Running Slave_SQL_Running Master_Host Master_Port Replicate_Do_DB memo
instance result Slave_IO_Running Slave_SQL_Running Master_Host Master_Port Replicate_Do_DB Slave_IO_State Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
{$host} {$res[‘result’]} {$res[‘Slave_IO_Running’]} {$res[‘Slave_SQL_Running’]} {$res[‘Master_Host’]} {$res[‘Master_Port’]} {$res[‘Replicate_Do_DB’]} {$memo}
{$host} {$res[‘result’]} {$res[‘Slave_IO_Running’]} {$res[‘Slave_SQL_Running’]} {$res[‘Master_Host’]} {$res[‘Master_Port’]} {$res[‘Replicate_Do_DB’]} {$res[‘Slave_IO_State’]} {$res[‘Last_IO_Errno’]} {$res[‘Last_IO_Error’]} {$res[‘Last_SQL_Errno’]} {$res[‘Last_SQL_Error’]}

echo ————————
echo 如果你的光驱中有光盘请先弹出然后继续!
:n
echo 您要继续吗?输入y整机杀毒开始,输入u只杀u盘,输入n退出!
:retry
set /p c=请输入您的选择(y/u/n):

访问方式:

相关文章

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图