简体   繁体   English

ruby on rails-用户'root'@'localhost'的访问被拒绝

[英]ruby on rails- Access denied for user 'root'@'localhost'

I am new with ruby on rails and im trying to follow that tutorial : tutorial 我是新上轨和IM试图按照该教程红宝石: 教程

when I tried to run mysql I got error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 当我尝试运行mysql时出现错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I didn't understand how should I run those command: 我不明白如何运行这些命令:

mysql> create database library_development;
 Query OK, 1 row affected (0.01 sec)

mysql> grant all privileges on library_development.*
to 'root'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

I will be happy for some help. 我很乐意提供帮助。

thanks. 谢谢。

Your database configuration is wrong. 您的数据库配置错误。 In the database.yml you should set the right login and password. 在database.yml中,您应该设置正确的登录名和密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Ruby on Rails MYSQL 错误用户“root@localhost”拒绝访问 - Ruby on Rails MYSQL error Access denied for user 'root@localhost' Mysql2 ::错误访问被拒绝用户'root'@'localhost'(使用密码:NO)ruby on rails - Mysql2::Error Access denied for user 'root'@'localhost' (using password: NO) ruby on rails 用户'root'@'localhost'的访问被拒绝 - Access denied for user 'root'@'localhost' 用户'root'@'localhost'的访问被拒绝 - Access denied for user 'root'@'localhost' 用户'root'@'localhost'的访问被拒绝 - Access denied for user 'root'@'localhost' Rails mysql 用户'root'@'localhost'的访问被拒绝(使用密码:否)错误 - Rails mysql Access denied for user 'root'@'localhost' (using password: NO) error 用户 'root'@'localhost' 拒绝 Rails 和 Mysql2 访问(使用密码:NO) - Rails and Mysql2 Access denied for user 'root'@'localhost' (using password: NO) 用户'root'@'localhost'的访问被拒绝(使用密码:NO)Rails 2 - Access denied for user 'root'@'localhost' (using password: NO) Rails 2 Rails 应用拒绝用户 root @ localhost 访问 mysql - Rails app denied access to mysql for user root @ localhost 用户'root'@'localhost'对数据库'drupal'的访问被拒绝 - Access denied for user 'root'@'localhost' to database 'drupal'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM