If that can connect, then, MySQL engine is working okay with your login/password.
If not, then the password could be incorrect or it allows access from other machines except for localhost. I fixed my error by changing my password (bcoz I forgot what it was!).
Didn’t realise you have responded with a “reinstall”. Got pulled away from my desk.
It would have been the MySQL setup. Try adding a piece of the security at a time, eg set password, test RoR. Then allow remote access and test RoR.
There are some HowTos on the MySQL site. If your RoR setup is on the same machine as the database (and you don’t need remote access to administer your database), you can do without remote access.