11/01/2560

ตั้งค่า phpMyAdmin เชื่อมต่อ SQL หลายเซิฟเวอร์

  1. # cd /etc/phpMyAdmin/
  2. # mv config.inc.php config.inc.php.bak
  3. # cp /usr/share/doc/phpMyAdmin-4.0.10.7/examples/config.manyhosts.inc.php .
  4. # mv config.manyhosts.inc.php config.inc.php
  5. # vi config.inc.php
  6. Edit host , $cfg['blowfish_secret'] and Comment follow below.
    ...
    $i=0;
    $hosts = array (
    "1.1.1.1",
    "2.2.2.2",
    );foreach ($hosts as $host) {
    $cfg['blowfish_secret'] = '1516513191278377433'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
    ...
    /**$cfg['Servers'][$i]['controluser']      = 'pma';
    $cfg['Servers'][$i]['controlpass']      = 'pmapass';*/
    ...
    /**$cfg['Servers'][$i]['verbose']  = '';
    $cfg['Servers'][$i]['pmadb']    = 'phpmyadmin';
    $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma__relation';
    $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
    $cfg['Servers'][$i]['history'] = 'pma__history';
    $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
    $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
    $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
    $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
    $cfg['Servers'][$i]['recent'] = 'pma__recent';*/
    }
  7. # service httpd restart
  8. Add or change user privilege for connect from any host (%).


ไม่มีความคิดเห็น:

แสดงความคิดเห็น