On Sat, May 21, 2011 at 3:41 PM, Manny 777 <[email protected]> wrote:

> Hello,
>
> I am building my first application with MySQL database and I am solving
> this problem - my app can't to connect to MySQL server.
>
> MySQL server is running, in terminal (I am working at Mac) I created
> MySQL table and I set password to MySQL with using following command:
>
> mysqladmin -u root password 'mypass'
>
> in database.yml is:
>
> development:
>  adapter: mysql2
>  encoding: utf8
>  reconnect: false
>  database: accounts
>  pool: 5
>  username: root
>  password: mypass
>  socket: /tmp/mysql.sock
>
> And now I am trying my application, I am getting in browser error:
>
> Mysql2::Error
> Access denied for user 'root'@'localhost' (using password: YES)
>
>
> I don't know what could be wrong -- the passwords are the same, I
> thought is needed restart MySQL server -- so I did it, but still the
> same error...
>
> Could me someone help, please, where is fault? I am wondering about this
> error whole afternoon, but without success...
>
> Thanks a lot.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

Hello Manny

Use another user, not root

Create a new user, for example, deploy, give permissions GRANT over the DB.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to