Monday, October 10, 2011

phpMyAdmin – Invalid hostname for server 2

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
PLAIN TEXT
PHP:
  1. /* This has been commented out because of error message
  2. $i++;
  3. $cfg['Servers'][$i]['host']            = '';
  4. $cfg['Servers'][$i]['port']            = '';
  5. $cfg['Servers'][$i]['socket']          = '';
  6. $cfg['Servers'][$i]['connect_type']    = 'tcp';
  7. $cfg['Servers'][$i]['extension']       = 'mysql';
  8. $cfg['Servers'][$i]['compress']        = FALSE;
  9. $cfg['Servers'][$i]['controluser']     = '';
  10. $cfg['Servers'][$i]['controlpass']     = '';
  11. $cfg['Servers'][$i]['auth_type']       = 'config';
  12. $cfg['Servers'][$i]['user']            = 'root';
  13. $cfg['Servers'][$i]['password']        = '';
  14. $cfg['Servers'][$i]['only_db']         = '';
  15. $cfg['Servers'][$i]['verbose']         = '';
  16. $cfg['Servers'][$i]['pmadb']           = ''; // 'phpmyadmin' - see scripts/create_tables.sql
  17. $cfg['Servers'][$i]['bookmarktable']   = ''; // 'pma_bookmark'
  18. $cfg['Servers'][$i]['relation']        = ''; // 'pma_relation'
  19. $cfg['Servers'][$i]['table_info']      = ''; // 'pma_table_info'
  20. $cfg['Servers'][$i]['table_coords']    = ''; // 'pma_table_coords'
  21. $cfg['Servers'][$i]['pdf_pages']       = ''; // 'pma_pdf_pages'
  22. $cfg['Servers'][$i]['column_info']     = ''; // 'pma_column_info'
  23. $cfg['Servers'][$i]['history']         = ''; // 'pma_history'
  24. $cfg['Servers'][$i]['verbose_check']   = TRUE;
  25. $cfg['Servers'][$i]['AllowDeny']['order']
  26.                                        = '';
  27. $cfg['Servers'][$i]['AllowDeny']['rules']
  28.                                        = array();
  29. */
Thanks! I was just upgrading our phpMyAdmin, and came across the same problem - your post was very helpful.

0 comments:

Post a Comment

 
Design by GURU