One more addition: I was having this problem and not even the instructions above where working. but then I relized that the problem was the way I was prefixing all of my WP installations
they all are wp_somename_
When I changed the prefix (reinstalled WP) to somenamewp_ the problem went away.
So that first “wp_” was tripping it up