文章列表
public byte[] gbk2utf8(String chenese) {
char c[] = chenese.toCharArray();
byte[] fullByte = new byte[3 * c.length];
for (int i = 0; i < c.length; i++) {
int m = (int) c[i];
String word = Integer.toBinaryString(m);
// System.out.pri ...
- 2009-08-12 16:17
- 浏览 965
- 评论(0)
1,查看master的状态
SHOW MASTER STATUS;
Position 不应为0
2,查看slave的状态
show slave status;
Slave_IO_Running | Slave_SQL_Running 这两个字段 应为 YES|YES.
show processlist;
会有两条记录与同步有关 state为 Has read all relay log; waiting for the slave I/O thread to update it
和s Waiting for master to send event .
3,错 ...
- 2009-08-04 10:31
- 浏览 2869
- 评论(0)
1
创建从数据库服务器用来连接主数据库服务器的用户名密码,并授予 REPLICATION SLAVE 权限。
2
配置主数据库服务器如下:
log-bin=mysql-binserver-id=1
3
配置从数据库服务器如下:
server-id=2skip-slave #从数据库服务器启动时,不启动复制进程。replicate-do-db=xxx 指定要复制的数据库
4
将主数据库服务器的历史数据导入从数据库服务器,并记录主数据库服务器信息
mysql> FLUSH TABLES WITH READ LOCK;
mysql > SHOW ...
- 2009-05-31 17:58
- 浏览 742
- 评论(0)
varnish请求处理流程我的varnish启动脚本#!/bin/sh# 启动日志输出,使用cronolog进行日志切分;/usr/local/varnish/bin/varnishncsa -n /data/varnish/|/usr/local/sbin/cronolog /data/varnish/logs/wap-access-%Y-%m-%d-%H.log &./varnishd -n /data/varnish -f ../etc/varnish.conf -a 0.0.0.0:80 -s file,/data/varnish/varnish_cache.data,1G -i ...
- 2009-05-23 22:43
- 浏览 1546
- 评论(0)