Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

配置phpMyAdmin连接多实例MySQL

cp config.sample.inc.php config.inc.php
vim config.inc.php

/**
 * First server
 */
//$i++;
/* Authentication type */
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'master.rds.aliyun.com';
//$cfg['Servers'][$i]['compress'] = false;
//$cfg['Servers'][$i]['AllowNoPassword'] = false;

$hosts = array(
  '1' => array('host'=>'master.rds.aliyun.com', 'port'=>3306),
  '2' => array('host'=>'slave.rds.aliyun.com', 'port'=>3306)
);

for ($i=1; $i<=count($hosts); $i++) {
  /* Authentication type */
  $cfg['Servers'][$i]['auth_type'] = 'cookie';
  /* Server parameters */
  $cfg['Servers'][$i]['host'] = $hosts[$i]['host'];  //修改host
  $cfg['Servers'][$i]['port'] = $hosts[$i]['port']; 
  $cfg['Servers'][$i]['connect_type'] = 'tcp';
  $cfg['Servers'][$i]['compress'] = false;
  /* Select mysqli if your server has it */
  $cfg['Servers'][$i]['extension'] = 'mysqli';
  //$cfg['Servers'][$i]['AllowNoPassword'] = true;
  //$cfg['Servers'][$i]['user'] = $hosts[$i]['user'];  //修改用户名
  //$cfg['Servers'][$i]['password'] = $hosts[$i]['password'];  //密码
  /* rajk - for blobstreaming */
  $cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
  $cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
  $cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
  $cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
}
上一篇 curl测试dns解析时间及tcp连接时间
下一篇 隐藏Nginx版本号的方法