You can also use phpMyAdmin to manage multiple database servers using the same instance of phpMyAdmin. Go back to the phpMyAdmin configuration file, and take a closer look at the server configuration block you manipulated earlier. If you keep reading, you'll notice that the first configuration block is followed by many similar blocks, each one configured by default with empty values. $i++; $cfg['Servers'][$i]['host'] = ''; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = FALSE; $cfg['Servers'][$i]['controluser'] = ''; $cfg['Servers'][$i]['controlpass'] = ''; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['only_db'] = ''; $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - seescripts/create_tables.sql $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]['verbose_check'] = TRUE; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] = array(); In order to manage more than one server with phpMyAdmin, therefore, all you need to do is configure more servers, by setting values for each block. In case you run out (the default configuration file for phpMyAdmin supports 2 servers other than the primary one), just replicate an empty block (like the one) above and set values for it in the normal manner. Once multiple servers have been configured, phpMyAdmin will first display a list of servers, and allow you to select a server from the list for use, as seen here. Note that phpMyAdmin does not automatically connect to all the configured servers on startup; it only attempts a connection when a user selects a server. In case you need to disable access to a server temporarily, simply set the "host" parameter of the corresponding configuration block to empty, and the server will be ignored by phpMyAdmin You can also have phpMyAdmin automatically attempt a connection to any one of the listed servers via the $cfg['ServerDefault'] variable in the configuration file. For example, $cfg['ServerDefault'] = 2;
blog comments powered by Disqus |
|
|
|
|
|
|
|