views:

116

answers:

1

I have a problem using the heroku db:push command to transfer a MySQL database to heroku. I've tried using the same command for another app with a sqlite3 database and everything went fine.

C:\Users\reg\Team-Omni>heroku db:push

Loaded Taps v0.3.9 Auto-detected local database: mysql://127.0.0.1/omni_dev?encoding=utf8 Warning: Data in the app 'growing-mist-42' will be overwritten and will not be recoverable . Are you sure you wish to continue? (y/n)? y

Failed to connect to database:

Sequel::DatabaseConnectionError -> Mysql::Error: Access denied for user 'reg'@'localhost ' (using password: NO)

if i remove the password for the mysql anonymous account, the error changes to

Sequel::DatabaseConnectionError -> Mysql::Error: Access denied for user ''@'localhost' to database 'omni_dev'

--additional information--

my .gems file:

rails -v 2.3.8

andre-geokit --version 1.5.0 --source http://gems.github.com

+1  A: 

You are getting that error because you are not specifying the password for the local database connection. Apparently the username is configured as 'reg' (maybe in the MySQL config file). This doesn't have anything to do with the Heroku PostgreSQL database, it's a problem connecting to your local MySQL database (named omni_dev).

Try the following connection string:

mysql://USERNAME:[email protected]/omni_dev?encoding=utf8

for the appropriate values of USERNAME and PASSWORD.

Jeremy Evans
thanks! I got it working now :)
redge