Tue 21 Nov 2006
phpMyAdmin – Invalid hostname for server 2
Posted by Richard under Installation , Software[3] Comments
If you have installed phpMyAdmin, you may get the errors
Invalid hostname for server 2. Please review your configuration. Invalid hostname for server 3. Please review your configuration.
when you log in. If so, the solution is to comment out this block of code in config.inc.php (it appears twice) - just wrap it in '/*' and '*/' as I have below
PHP:
-
/* This has been commented out because of error message
-
$i++;
-
$cfg['Servers'][$i]['host'] = '';
-
$cfg['Servers'][$i]['port'] = '';
-
$cfg['Servers'][$i]['socket'] = '';
-
$cfg['Servers'][$i]['connect_type'] = 'tcp';
-
$cfg['Servers'][$i]['extension'] = 'mysql';
-
$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' - see scripts/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();
-
*/


November 27th, 2007 at 4:24 pm
Thanks! I was just upgrading our phpMyAdmin, and came across the same problem - your post was very helpful.
January 28th, 2008 at 9:42 pm
Sound good but now the username- and password fiels are denied. Looks like the db(s) is/are now non-protected!
September 23rd, 2008 at 7:34 am
It works like a charm!
Thanks!