如何配置database.yml文件

如何配置database.yml文件

我是php?name=%D0%C2%CA%D6" onclick="tagshow(event)" class="t_tag">新手,php?name=rails" onclick="tagshow(event)" class="t_tag">rails2.0.2php?name=%C1%AC%BD%D3" onclick="tagshow(event)" class="t_tag">连接MySQL5.0,如何配置database.yml文件,下面是我配置的,哪位兄弟指点下,先谢谢啦!

# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
 adapter: mysql
 database: workingtime
 host: localhost
 username: root
 password: 123
 timeout: 5000

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
 adapter: mysql
 database: workingtime
 host: localhost
 username: root
 password: 123
 timeout: 5000

production:
 adapter: mysql
 database: workingtime
 host: localhost
 username: root
 password: 123
 timeout: 5000
development:
 adapter: mysql
 database: skmaildb
 host:  localhost
# host:  bsweb
 port:  3306
 username: bsproject
 password: bsproject
 encoding: utf8
 socket: /path/to/your/mysql.sock

test:
 adapter: mysql
 database: skmaildb
 host:  localhost
# host:  bsweb
 port:  3306
 username: bsproject
 password: bsproject
 encoding: utf8
 socket: /path/to/your/mysql.sock

production:
 adapter: mysql
 database: skmaildb
 host:  localhost
# host:  bsweb
 port:  3306
 username: bsproject
 password: bsproject
 encoding: utf8
 socket: /path/to/your/mysql.sock
socket是什么?必须配置socket吗?
如果需要输出中文的话,一定要有 encoding: utf8的配置。
谢谢,这个配置文件还有其他配置选项吗?
adapter: mysql
database: workingtime
host: localhost
username: root
password: 123
我也想知道socket是什么?
When you setup your server in different place, you need setup socket

For example:
fastcgi.server = (".fcgi" => ( "railsapp" =>
 ( "min-procs" => 1,
  "max-procs" => 5,
  "socket" => "/tmp/ruby-railsapp.fastcgi",
  "bin-path" => "/path/to/dispatch.fastcgi"
 )
))
谢谢各位兄弟!!