BINLOG就是一个记录SQL语句的过程,和普通的LOG一样。不过只是她是二进制存储,普通的是十进制存储罢了。 1、配置文件里要写的东西: [mysqld] log-bin=mysql-bin(名字可以改成自己的,如果不改名字的话,默认是以主机名字命名) 重新启动MSYQL服务。 二进制文件里面的东西显示的就是执行所有语句的详细记录,当然一些语句不被记录在内,要了解详细的,见手册页。 2、查看自己的BINLOG的名字是什么。 show binlog events; query result(1 records) Log_name Pos Event_type Server_id End_log_pos Info yueliangdao_binglog.000001 4 Format_desc 1 106 Server ver: 5.1.22-rc-community-log, Binlog ver: 4 3、我做了几次操作后,她就记录了下来。 又一次 show binlog events 的结果。 query result(4 records) Log_name Pos Event_type Server_id End_log_pos Info yueliangdao_binglog.000001 4 Format_desc 1 106 Server ver: 5.1.22-rc-community-log, Binlog ver: 4 yueliangdao_binglog.000001 106 Intvar 1 134 INSERT_ID=1 yueliangdao_binglog.000001 134 Query 1 254 use test; create table a1(id int not null auto_increment primary key, str varchar(1000)) engine=myisam yueliangdao_binglog.000001 254 Query 1 330 use […]
View Details
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
//桌面提醒 function notify(title, content) { if(!title && !content){ title = "桌面提醒"; content = "您看到此条信息桌面提醒设置成功"; } var iconUrl = "/images/send_ok.png"; if (window.webkitNotifications) { //chrome老版本 if (window.webkitNotifications.checkPermission() == 0) { var notif = window.webkitNotifications.createNotification(iconUrl, title, content); notif.display = function() {} notif.onerror = function() {} notif.onclose = function() {} notif.onclick = function() {this.cancel();} notif.replaceId = 'Meteoric'; notif.show(); } else { window.webkitNotifications.requestPermission($jy.notify); } } else if("Notification" in window){ // 判断是否有权限 if (Notification.permission === "granted") { var notification = new Notification(title, { "icon": iconUrl, "body": content, }); } //如果没权限,则请求权限 else if (Notification.permission !== 'denied') { Notification.requestPermission(function(permission) { // Whatever the user answers, we make sure we store the // information if (!('permission' in Notification)) { Notification.permission = permission; } //如果接受请求 if (permission === "granted") { var notification = new Notification(title, { "icon": iconUrl, "body": content, }); } }); } } } |
from:http://www.cnblogs.com/foolin/p/3822294.html
View Details