免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 23116 | 回复: 1

======[已解决]安装redmine遇到的问题之二====== [复制链接]

论坛徽章:
7
操作系统版块每日发帖之星
日期:2015-06-16 22:20:00IT运维版块每日发帖之星
日期:2015-06-17 22:20:00IT运维版块每周发帖之星
日期:2016-01-07 23:04:26操作系统版块每日发帖之星
日期:2016-05-17 06:20:00操作系统版块每日发帖之星
日期:2016-05-21 06:20:00操作系统版块每日发帖之星
日期:2016-07-05 06:20:0015-16赛季CBA联赛之广东
日期:2017-07-13 16:08:03
发表于 2014-06-17 12:32 |显示全部楼层
本帖最后由 奋斗的毛毛虫 于 2014-06-17 12:52 编辑

[root@localhost redmine-2.5.1]# pwd
/var/www/html/redmine-2.5.1

[root@localhost redmine-2.5.1]# rake db:migrate RAILS_ENV='production' --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Host 'company-program01' is not allowed to connect to this MySQL server
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/mysql_adapter.rb:411:in `real_connect'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/mysql_adapter.rb:411:in `connect'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/mysql_adapter.rb:131:in `initialize'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/mysql_adapter.rb:38:in `new'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/mysql_adapter.rb:38:in `mysql_connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/model_schema.rb:224:in `table_exists?'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/attribute_methods/primary_key.rb:75:in `get_primary_key'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/attribute_methods/primary_key.rb:60:in `reset_primary_key'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/attribute_methods/primary_key.rb:49:in `primary_key'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.17/lib/active_record/attribute_assignment.rb:13:in `attributes_protected_by_default'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.17/lib/active_model/mass_assignment_security.rb:216:in `block in protected_attributes_configs'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.17/lib/active_model/mass_assignment_security.rb:188:in `yield'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.17/lib/active_model/mass_assignment_security.rb:188:in `default'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.17/lib/active_model/mass_assignment_security.rb:188:in `protected_attributes'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.17/lib/active_model/mass_assignment_security.rb:118:in `block in attr_protected'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.17/lib/active_model/mass_assignment_security.rb:117:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.17/lib/active_model/mass_assignment_security.rb:117:in `attr_protected'
/var/www/html/redmine-2.5.1/app/models/issue_relation.rb:73:in `<class:IssueRelation>'
/var/www/html/redmine-2.5.1/app/models/issue_relation.rb:18:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:359:in `require_or_load'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:192:in `block in const_missing'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `const_missing'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:192:in `block in const_missing'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `const_missing'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:192:in `block in const_missing'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `const_missing'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:192:in `block in const_missing'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:190:in `const_missing'
/var/www/html/redmine-2.5.1/lib/redmine/helpers/gantt.rb:28:in `<class:Gantt>'
/var/www/html/redmine-2.5.1/lib/redmine/helpers/gantt.rb:21:in `<module:Helpers>'
/var/www/html/redmine-2.5.1/lib/redmine/helpers/gantt.rb:19:in `<module:Redmine>'
/var/www/html/redmine-2.5.1/lib/redmine/helpers/gantt.rb:18:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/www/html/redmine-2.5.1/lib/redmine.rb:56:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/www/html/redmine-2.5.1/config/initializers/30-redmine.rb:4:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/html/redmine-2.5.1/config/environment.rb:14:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:103:in `require_environment!'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:174:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:174:in `invoke_prerequisites'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/usr/bin/rake:33:in `<main>'
Tasks: TOP => db:migrate => environment
[root@localhost redmine-2.5.1]#

[root@localhost redmine-2.5.1]# ps -ef | grep mysql | grep -v grep
root      3637     1  0 Jun16 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql     3739  3637  0 Jun16 ?        00:00:44 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root     19778 17445  0 12:19 pts/1    00:00:00 mysql
[root@localhost redmine-2.5.1]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| redmine            |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql> use redmine;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql>

[root@localhost redmine-2.5.1]# mysql -uredmine -predmine -A
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| redmine            |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> use redmine;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> quit
Bye

[root@localhost redmine-2.5.1]# more config/database.yml
# Default setup is given for MySQL with ruby1.9. If you're running Redmine
# with MySQL and ruby1.8, replace the adapter name with `mysql`.
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
# Line indentation must be 2 spaces (no tabs).

production:
  adapter: mysql
  database: redmine
  host: company-program01
  username: redmine
  password: redmine
  encoding: utf8

[root@localhost redmine-2.5.1]# hostname
company-program01
[root@localhost redmine-2.5.1]#



mysql服务已经正常启动了,并且可以正常访问;
mysql使用redmine用户连接没有问题;
redminedatabase.yml配置文件的配置也应该没有问题呀。
再次确认主机名称也没有问题。

请大家帮我看看问题出在哪里呢?谢谢了!!

论坛徽章:
7
操作系统版块每日发帖之星
日期:2015-06-16 22:20:00IT运维版块每日发帖之星
日期:2015-06-17 22:20:00IT运维版块每周发帖之星
日期:2016-01-07 23:04:26操作系统版块每日发帖之星
日期:2016-05-17 06:20:00操作系统版块每日发帖之星
日期:2016-05-21 06:20:00操作系统版块每日发帖之星
日期:2016-07-05 06:20:0015-16赛季CBA联赛之广东
日期:2017-07-13 16:08:03
发表于 2014-06-17 12:50 |显示全部楼层
本帖最后由 奋斗的毛毛虫 于 2014-06-17 12:52 编辑

解决方法:
[root@localhost redmine-2.5.1]# mysql -h192.168.1.205 -uredmine -predmine
ERROR 1130 (HY000): Host 'company-program01' is not allowed to connect to this MySQL server         // mysql服务无法正常访问

[root@localhost redmine-2.5.1]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create user 'redmine'@'192.168.1.205' identified by 'redmine';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on redmine.* to 'redmine'@'192.168.1.205';
Query OK, 0 rows affected (0.00 sec)

[root@localhost redmine-2.5.1]# mysql -h192.168.1.205 -uredmine -predmine -A
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
Bye


[root@localhost redmine-2.5.1]# RAILS_ENV=production rake db:migrate
==  Setup: migrating ==========================================================
-- create_table("attachments", {:force=>true})
   -> 0.0203s
-- create_table("auth_sources", {:force=>true})
   -> 0.0070s
-- create_table("custom_fields", {:force=>true})
   -> 0.0068s
-- create_table("custom_fields_projects", {:id=>false, :force=>true})
   -> 0.0053s
-- create_table("custom_fields_trackers", {:id=>false, :force=>true})
   -> 0.0056s
-- create_table("custom_values", {:force=>true})
   -> 0.0063s
-- create_table("documents", {:force=>true})
   -> 0.0064s
-- add_index("documents", ["project_id"], {:name=>"documents_project_id"})
   -> 0.0133s
-- create_table("enumerations", {:force=>true})
   -> 0.0070s

…………………………
…………………………
中间是成功的节奏,哈哈哈!!
…………………………
…………………………

==  StoreRelationTypeInJournalDetails: migrating ==============================
==  StoreRelationTypeInJournalDetails: migrated (0.0101s) =====================

==  DeleteOrphanTimeEntriesCustomValues: migrating ============================
==  DeleteOrphanTimeEntriesCustomValues: migrated (0.0021s) ===================

==  ChangeChangesetsCommentsLimit: migrating ==================================
-- change_column(:changesets, :comments, :text, {:limit=>16777216})
   -> 0.0174s
==  ChangeChangesetsCommentsLimit: migrated (0.0176s) =========================


OK啦,问题解决啦!!之前官方给的SQL……
mysql> create database redmine character set utf8;
mysql> create user 'redmine'@'localhost' identified by 'redmine';
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
// 因为修改了主机名,所以不好用啦。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP