Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
3 total  XML / RSS feed 

MySQL 5 macports setup

You have to symlink mysql to the location on osx

first find out where mysql has put the socket:
mysql_config5 --socket

Next symlink /tmp/mysql.sock to the right location of the socket
sudo ln -s path-of-mysql.sock-from-above /tmp/mysql.sock


Start MySQL
sudo /opt/local/share/mysql5/mysql/mysql.server start

or
/opt/local/bin/mysqld_safe5


Stop MySQL
sudo /opt/local/share/mysql5/mysql/mysql.server stop

MySQL 4 macports setup

If this is a new install
If you did not choose the server variant you may add a mysql user and you will need to change the ownership to that user:
sudo chown mysql /opt/local/var/db/mysql
sudo chown mysql /opt/local/var/run/mysqld
sudo chown mysql /opt/local/var/log/mysql


You might want to run
sudo -u mysql mysql_install_db


You have to symlink mysql to the location on osx

first find out where mysql has put the socket:
mysql_config --socket

Next symlink /tmp/mysql.sock to the right location of the socket
sudo ln -s path-of-mysql.sock-from-above /tmp/mysql.sock


Start MySQL
sudo /opt/local/share/mysql/mysql.server start


Stop MySQL
sudo /opt/local/share/mysql/mysql.server stop

Typo current error

NoMethodError in Admin/content#new 
undefined method `text_filter=' for #
app/controllers/admin/content_controller.rb:24:in `new'
Show framework trace 
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1200:in `method_missing'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch'
/home/rsimplicio/web/public/typo/dispatch.fcgi:20
/home/rsimplicio/web/public/typo/dispatch.fcgi:18:in `each_cgi'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in `each'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in `each_cgi'
/home/rsimplicio/web/public/typo/dispatch.fcgi:18
    
Request
Parameters: None

Show session dump

--- 
:user: !ruby/object:User 
  attributes: 
    name: Robert
    id: "1"
    password: <snipped for security reasons>
    login: Robert
    email: 
:return_to: 
flash: !ruby/hash:ActionController::Flash::FlashHash {}
Response
Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}
« Newer Snippets
Older Snippets »
3 total  XML / RSS feed