Skip to content

Commit 8022e93

Browse files
committed
Changed Database default option to MySQL
1 parent 540043c commit 8022e93

File tree

4 files changed

+33
-128
lines changed

4 files changed

+33
-128
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313
# Ignore all logfiles and tempfiles.
1414
/log/*.log
1515
/tmp
16+
17+
Gemfile.lock

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gem 'rails', '3.2.6'
55
# Bundle edge Rails instead:
66
# gem 'rails', :git => 'git://github.com/rails/rails.git'
77

8-
gem 'sqlite3'
8+
gem 'mysql2'
99

1010
gem 'json'
1111

Gemfile.lock

Lines changed: 0 additions & 114 deletions
This file was deleted.

config/database.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
1-
# SQLite version 3.x
2-
# gem install sqlite3
1+
# MySQL. Versions 4.1 and 5.0 are recommended.
2+
#
3+
# Install the MYSQL driver
4+
# gem install mysql2
35
#
4-
# Ensure the SQLite 3 gem is defined in your Gemfile
5-
# gem 'sqlite3'
6+
# Ensure the MySQL gem is defined in your Gemfile
7+
# gem 'mysql2'
8+
#
9+
# And be sure to use new-style password hashing:
10+
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
611
development:
7-
adapter: sqlite3
8-
database: db/development.sqlite3
12+
adapter: mysql2
13+
encoding: utf8
14+
reconnect: false
15+
database: railstrap_development
916
pool: 5
10-
timeout: 5000
17+
username: root
18+
password:
19+
socket: /tmp/mysql.sock
1120

1221
# Warning: The database defined as "test" will be erased and
1322
# re-generated from your development database when you run "rake".
1423
# Do not set this db to the same as development or production.
1524
test:
16-
adapter: sqlite3
17-
database: db/test.sqlite3
25+
adapter: mysql2
26+
encoding: utf8
27+
reconnect: false
28+
database: railstrap_test
1829
pool: 5
19-
timeout: 5000
30+
username: root
31+
password:
32+
socket: /tmp/mysql.sock
2033

2134
production:
22-
adapter: sqlite3
23-
database: db/production.sqlite3
35+
adapter: mysql2
36+
encoding: utf8
37+
reconnect: false
38+
database: railstrap_production
2439
pool: 5
25-
timeout: 5000
40+
username: root
41+
password:
42+
socket: /tmp/mysql.sock

0 commit comments

Comments
 (0)