In case it helps, I had the same issue after migrating WordPress from local to live server, with custom prefix, and everything was OK except the admin dashboard would not open.
For me it was because the custom database prefix had a capital in it, which got turned into lowercase through the import and export process. Updating the wp-config allowed the site to function but would not let me access the dashboard.
I also had to manually update the database in two tables
1) wp_<customPrefix>_usermeta – look through the “meta_key” column and change all values to the correct prefix (it was about 10 values for me).
2) wp_<customPrefix>_options – in the “option_name” column find an entry that looks like “wp_<customPrefix>_user_roles” and change it to the correct prefix.
Once I did this it all worked again.