I was receiving this error on install from NextGEN 1.6.2 due to case sensitive WordPress table prefixes “$table_prefix =”
Here’s a forum link to the Author’s fix for the problem:
WordPress Support Forum link to fix
Download the replacement install.php and upgrade.php via this link
http://code.google.com/p/nextgen-gallery/source/detail?r=823

