Welcome Guest | Login

Access denied for user 'xxxx'@'localhost' (using password: YES) when doing rake db:migrate

I'm trying to deploy a local rails application to this new hosting account, and I am at the step where I do the database migration.  However, when I do the rake command, I get:

Access denied for user 'xxxx'@'localhost' (using password: YES)

production:
 adapter: mysql
 database: account_dbname
 username: account_user
 password: password
 host: localhost

Any suggestions?

2008-07-23 08:58 PM

Jeff
Hi Jeffb,

The database name which you have given in the railsapp/config/database.yml file was a wrong one, I have now corrected that. Could you please give a try now.  

2008-07-23 09:11 PM

Thanks, that got me a little farther, but now I'm getting this:

rake RAILS_ENV=production db:migrate --trace
(in /home/xxxxx/public_html/tournament_director)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
syntax error on line 36, col 6: `  host: localhost'

Please note that I created a new database and user that more accurately reflects the production environment, so the items won't be exactly as they were when I opened the ticket.  However, I think I've updated my database.yml correctly.

2008-07-23 09:23 PM

Jeff
Hi- Please give a try after commenting out the line "host: localhost" in the production section of your "railsapp/config/database.yml" file.

2008-07-23 10:36 PM

HostingRails Support
rake aborted!
syntax error on line 37, col 0: `'

There is no line 37 in the database.yml file, so which file is erroring?

2008-07-24 07:40 AM

Jeff
I think the issue is related with the password assigned for your mysql user. Can you please reset this password and set a normal password.(avoiding special charecters).

Once this is done please make the necessary changes in the database.yml file. Then run the rake step and see how things are going..

2008-07-24 11:02 AM

Regards,
Rahul
Rahul,

Rake ran, and it created the tables, so that's great news.  Now, I need some assistance getting the data out of my local database up to the server.  I've been running this application locally, so I want to take the data and export it and import it into the hostingrails database that rake just created.

What's the best way to do that?

Thanks again.

2008-07-24 11:31 AM

Jeff
Hi Jeffb,

You can use cPanel --> PhpMyAdmin to enter the data to the required tables in the database.

2008-07-24 12:29 PM

Regards,
Rahul
Ok, I see that I can import data from a file into the database on the hosting server, but what command do I use to get data exported from the database on my laptop?  That's the issue here:  the data is currently on my local PC, and I want to export it from that database and import it into the database on the hosting server.

How do I get the data out of my local PC's database into a file that's useful to PhpMyAdmin?

Thanks.

2008-07-24 12:53 PM

Jeff
Hi- I assume you are using MySQL on your laptop. If yes- you could take the dump of your database by issuing the following command.

Mysqldump datbase_name > outputfile.sql

You can import this file using PhpMyAdmin. If you need our help, please upload the MySQL dump file into your home directory on our server, we'll do it for you .

2008-07-24 06:59 PM

HostingRails Support
I was able to import the data, so thank you very much.  I've updated the other ticket with the latest error I am seeing, but the database issue seems to have been resolved.

2008-07-24 07:23 PM

Jeff

Hello Guest! In order to post you must be an active client with us, please log in or sign up.