Feb 22

MySQL replication configuration for Community Edition

    This is just a brief summary for the whole steps, more details please refer to : http://dev.mysql.com/doc/refman/5.5/en/replication.html

Steps: 

1. master and slave server must have the same database structure and same data;(dump data from master to slave).

2. for master server:set server-id=1 and open binary log(log-bin=mysql-bin.log)

    for slave server : set server-id=2.

3. start master server, use "show master status\G" to show binary log file name and position;

4. start slave server, use below command to set slave server's related master server info.

mysql> CHANGE MASTER TO

         ->     MASTER_HOST='master_host_name',

         ->     MASTER_USER='replication_user_name',

         ->     MASTER_PASSWORD='replication_password',

         ->     MASTER_LOG_FILE='recorded_log_file_name',

         ->     MASTER_LOG_POS=recorded_log_position;

5. check the log of master and slave server, if no errors, then means all ready, then execute start slave in slave server.
Reference command :  "show processlist\G" , "show master status\G", "show slave status\G" , "start slave" , "stop slave" , "reset slave" , "show variables like
*** "

Dec 10

NSIS制作B/S架构安装程序

    开门见山,B/S架构应用程序的安装程序无非就是拷贝一些文件,检查一下环境配置,注册服务,启动服务之类的了。拷贝文件就没什么好说的了。下面着记录一下如下几点:

  1. 端口检查
  2. 读写注册表
  3. 调用外部可执行文件
  4. 注册、启动、停止服务
  5. 注册环境变量

Continue reading

Jul 19

MySQL启动1067错误的解决

    昨天晚上在不小心把xp系统给搞坏了,今天早晨起来一狠心就把原来机器上的XP跟vista都歌格了,干脆就直接装vista玩儿算了。结果所有的软件又都得重新装一遍了,装到mysql的时候就开始处问题了,以前也有遇到过并且也解决了,只是没当回事儿,结果这次又遇到了,网上找了半天都不是根本的解决办法,最后还是在mysql自己的配置文件中找到了解决的办法,一开始就隐隐约约的记得mysqld这个命令时有一个参数可以设置配置文件的路径的,可是一直记不起来时哪个参数,后来在无意中看到了,现在总结一下。 Continue reading