On Mar 30, 2007, at 4:33 PM, Ryan Schmidt wrote:
Wouldn't it be much better just to assign the ownership to the mysql user?
sudo chown mysql:mysql /opt/local/var/db/mysql5
It's already set: drwxr-xr-x 13 mysql mysql 442 Mar 29 21:05 mysql5
In fact I was under the impression that this was done automatically for you when you initially create the database using the command printed at the end of the mysql5 port installation. Did this not happen for you?
It did create the inital db; I also created a user (retrospectiva) and 2 databases (couldn't do it through mysql manager gui, I had to do it in the command line as root). I assigned the retrospectiva permissions to edit retrospectiva and retrospectiva_dev dbs. I edited the retrospectiva conf.yml file to this info, so next....
Are you seeing error messages? If so, what are they?
When I try to run rake: subversion:/opt/apache2/htdocs/retrospectiva admin$ rake RAILS_ENV=production db:retro:load --trace (in /opt/apache2/htdocs/retrospectiva) ** Invoke db:retro:load (first_time) ** Invoke environment (first_time) ** Execute environment Rails Error: Unable to access log file. Please ensure that /opt/ apache2/htdocs/retrospectiva/config/../log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed. ** Execute db:retro:load ** Invoke db:retro:load_schema (first_time) ** Invoke environment ** Execute db:retro:load_schema ===== Load the database schema ** Invoke db:schema:load (first_time) ** Invoke environment ** Execute db:schema:load -- create_table("attachments", {:force=>true}) rake aborted! Access denied for user 'retrospectiva'@'localhost' (using password: YES) /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/mysql_adapter.rb:389:in `real_connect' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/mysql_adapter.rb:389:in `connect' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/mysql_adapter.rb:152:in `initialize' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/mysql_adapter.rb:82:in `new' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/mysql_adapter.rb:82:in `mysql_connection' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/ connection_specification.rb:262:in `send' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/ connection_specification.rb:262:in `connection_without_query_cache=' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/query_cache.rb:54:in `connection=' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/ connection_specification.rb:230:in `retrieve_connection' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/ connection_specification.rb:78:in `connection' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/migration.rb:275:in `method_missing' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/migration.rb:259:in `say_with_time' /opt/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/migration.rb:259:in `say_with_time' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/migration.rb:273:in `method_missing' ./db/schema.rb:7 /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/schema.rb:43:in `instance_eval' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/schema.rb:43:in `define' ./db/schema.rb:5 /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:488:in `load' /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:488:in `load' /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:342:in `new_constants_in' /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:488:in `load' /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/tasks/ databases.rake:31 /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /opt/apache2/htdocs/retrospectiva/config/../lib/tasks/database.rake:12 /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /opt/apache2/htdocs/retrospectiva/config/../lib/tasks/database.rake:5 /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 /opt/local/bin/rake:16:in `load' /opt/local/bin/rake:16