Browse Source

mysql slave

amic 2 weeks ago
parent
commit
e8fc604c7a
1 changed files with 1 additions and 2 deletions
  1. 1 2
      config/db.php

+ 1 - 2
config/db.php

@@ -13,7 +13,7 @@ $db = [
     //'schemaCache' => 'cache',
     //'schemaCache' => 'cache',
 ];
 ];
 $enableSlaves = true;
 $enableSlaves = true;
-$slavesrv = 'mysql:host=192.168.1.4;port=3306;dbname='.DB_NAME; //slave с распределение нагрузки
+$slavesrv = 'mysql:host=192.168.1.4;port=3307;dbname='.DB_NAME; //slave с распределение нагрузки
 
 
 /*
 /*
 		Привышение нагрузки
 		Привышение нагрузки
@@ -28,7 +28,6 @@ if( file_exists('/.data2/status/cache_on.fl') ){
 if( file_exists('/home/admin/www-bot/replica-stop_192.168.1.3.fl') ){ //реплика упала
 if( file_exists('/home/admin/www-bot/replica-stop_192.168.1.3.fl') ){ //реплика упала
 	$enableSlaves = false;
 	$enableSlaves = false;
 }
 }
-	$enableSlaves = false;
 
 
 if(defined("DB_DSN")){
 if(defined("DB_DSN")){
     $port = "";
     $port = "";