Reputation: 41
I am trying to setup a central phpmyadmin server for multiple DB servers.
was reading these:
Signon works fine for both localhost(phpmyadmin.example.com) and the remote server(db1.example.com) and users are able to login to both. I have created the phpmyadmin database and pma_* tables in phpmyadmin.example.com. But history gets saved for sql queries only on localhost. When user logs in to db1, he sees this error:
The additional features for working with linked tables have been deactivated.
more details:
$cfg['Servers'][$i]['pmadb'] ... OK
$cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
General relation features: Disabled
$cfg['Servers'][$i]['table_info'] ... not OK [ Documentation ]
Display Features: Disabled
$cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['pdf_pages'] ... not OK [ Documentation ]
Creation of PDFs: Disabled
$cfg['Servers'][$i]['column_info'] ... not OK [ Documentation ]
Displaying Column Comments: Disabled
Browser transformation: Disabled
$cfg['Servers'][$i]['bookmarktable'] ... not OK [ Documentation ]
Bookmarked SQL query: Disabled
$cfg['Servers'][$i]['history'] ... not OK [ Documentation ]
SQL history: Disabled
$cfg['Servers'][$i]['designer_coords'] ... not OK [ Documentation ]
Designer: Disabled
$cfg['Servers'][$i]['tracking'] ... not OK [ Documentation ]
Tracking: Disabled
The documentation says that it is possible to save history in a central server. But am I doing it right? I tried to create a another set of pma_* tables and point db1 configuration to them. Didn't help. What I feel is that this configuration is trying to save history for db1 in db1 itself and I have to create pma_* tables in db1 (which I want to avoid). How can I point all servers' history to phpmyadmin.example.com?
Here is my config.inc.php
$i = 0;
$i++;
* Read configuration from dbconfig-common
* You can regenerate it using: dpkg-reconfigure -plow phpmyadmin
*/
if (is_readable('/etc/phpmyadmin/config-db.php')) {
require('/etc/phpmyadmin/config-db.php');
}
if (!empty($dbname)) {
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'signon';
$cfg['Servers'][$i]['SignonSession'] = 'SignonSession';
$cfg['Servers'][$i]['SignonURL'] = 'https://phpmyadmin.example.com/console.php';
/* Server parameters */
if (empty($dbserver)) $dbserver = 'localhost';
$cfg['Servers'][$i]['host'] = $dbserver;
if (!empty($dbport)) {
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['port'] = $dbport;
}
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
/* Optional: User for advanced features */
$cfg['Servers'][$i]['controluser'] = $dbuser;
$cfg['Servers'][$i]['controlpass'] = $dbpass;
/* Optional: Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = $dbname;
$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]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
}
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'db1.example.com';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'signon';
$cfg['Servers'][$i]['SignonSession'] = 'SignonSession';
$cfg['Servers'][$i]['SignonURL'] = 'https://phpmyadmin.example.com/console.php';
$cfg['Servers'][$i]['pmadb'] = $dbname;
$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]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['QueryHistoryDB'] = true;
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
Upvotes: 0
Views: 1573
Reputation: 12422
I don't see that you've configured a $cfg['Servers'][$i]['controlhost']
, which is needed to tell phpMyAdmin which server to use for the central database. See also http://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_controlhost. I suspect once you add that line, you'll have better luck.
Upvotes: 2