When trying to upgrade to a new db this error message drove me nuts for 10 minutes.
In case anyone else has problems with this, here's what to look out for:
1: In the db prefix field on the modx setup page, make sure you add the underscore after the prefix IE
yourprefix_
It's a simple thing but made all the difference.
2: Make sure you edit the core/config/config_inc.php file to match your new db and prefix and user. IE in the first 23 lines or so of this file will be all the DB name and user information. Make sure it all matches.
Note: You don't need the prefix underscore in this file.
Anyway worked for me, so I hope this helps anyone in the future who runs into this error.