How can I rework my MySQL password so that I can rake db: create on rails?
I've very much so tried it all.
when I db:rake cre开发者_如何学Pythonate, I get the following: Access denied for user 'root'@'localhost' (using password: NO). Please provide the root password for your mysql installation > rake aborted!
There is no password set. And I've searched all day on stackoverflow and on google. I've even set a password for it and tried that out.
Yes, I've been to http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-unix
But when I followed the instructions to reset the password, terminal and myself are unable to locate the .pid file!
I've tried using the mysqld_safe with --skip-grant-tables option and wound up with this:
110821 23:32:22 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql rm: /tmp/mysql.sock: Permission denied 110821 23:32:24 mysqld_safe mysqld from pid file /usr/local/var/mysql/Tony-Ngs-MacBook-Air.local.pid ended
I believe you just need to add the password in your database.yml file. That's an error that's displayed when the client connecting to mysql didn't specify a password, not a configuration issue with the server (although it does appear that way with the phrasing).
If you need to set your password in MySQL, you do it with a grant option:
GRANT ALL ON *.* TO 'railsuser'@'localhost' IDENTIFIED BY 'password';
精彩评论