Rails keeps wanting to use localhost no matter what I put in database.yml file

Firs of all, I am a newb to running Rails on JRuby.

But I am trying to get rails to use a remote MySQL server using

For some reason no matter what I put into the database.yml file, it
keeps wanting to use username@localhost for the mysql connection.

I have tried both of these formats:

adapter: jdbcmysql
database: rails_test_prod
username: rails_test
password: rails_testpass
host: mysqlhost.mydomain.com

adapter: jdbc
username: rails_test
password: rails_testpass
driver: com.mysql.jdbc.Driver
url: jdbc:mysql://mysqlhost.mydomain.com:3306/rails_test_prod

Neither one seems to work.

When I try to test it using: $ jruby -S rails server -e production

I get this error:

ActiveRecord::JDBCError: The driver encountered an unknown error:
java.sql.SQLException: Access denied for user ‘rails_test’@‘myhostname’
(using password: YES)

I bet this is something silly right?

This error normally occurs when the account ‘rails_test’ isn’t setup
on your mysql server with the correct permissions.

If you log into that db and create that user with the access it needs,
it should take care of it for you.

Except the error is ‘rails_test’@‘mylocalhostname’ and not
‘rails_test@mysqlservername’ for some reason…it keeps trying to use
localhost and not the mysql server.

I stand corrected, YOU ARE correct. It’s the error message that is

I did a tcpdump and watched it try to connect to the mysql server, and
it was indeed having problems with its username/password.