# oneproxy增加多个用户配置如下 


  # by  coco 

 

  # 2016-03-09 

 
 
 
 
 proxy-user-list.1——n   项,表示新增加不同的用户。前提是这些用户必须可以登录mysql,并在mysql中有响应的操作权限。 

 
 
 
 

   [root@hadoop94 conf]# vim proxy.conf  
 
 
 
 
  
 
 

   [oneproxy] 
 
 
 

   keepalive     = 1 
 
 
 

   event-threads = 4 
 
 
 

   log-file      = log/oneproxy.log 
 
 
 

   pid-file      = log/oneproxy.pid 
 
 
 

   lck-file      = log/oneproxy.lck 
 
 
 
 
  
 
 

   mysql-version            = 5.6.27 
 
 
 

   proxy-address            = :3307 
 
 
 

   proxy-master-addresses.1 = 192.168.8.94:3306@server1 
 
 
 
 
  
 
 
proxy-user-list.1          = test/1378F6CC3A8E8A43CA388193FBED5405982FBBD3@test
 
 
proxy-user-list.2          = mha_user/389433BDF5A642E23483ED08E6E62D91E7E5B7CF@wwn   
 
 

   proxy-user-group         = server1:test/1378F6CC3A8E8A43CA388193FBED5405982FBBD3 
 
 
 
 
  
 
 

   #proxy-part-template      = conf/template.txt 
 
 
 

   #proxy-part-tables.1      = conf/part.txt 
 
 
 

   proxy-part-tables.2      = conf/part2.txt 
 
 
 

   #proxy-charset            = gbk_chinese_ci 
 
 
 

   proxy-charset            = utf8_general_ci 
 
 
 

   #proxy-group-policy       = server1:master-only 
 
 
 

   proxy-group-policy       = server1:0 
 
 
 

   proxy-table-security    =  pdcheck_hlbr:0 
 
 
 

   proxy-secure-client      = 192.168.8.94 
 
 
 
 
  
 
 

   remote-address           = 192.168.8.94:4041 
 
 
 

   vip-address              = 192.168.1.120/eth0:0