# And be sure to use new-style password hashing:
# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
#
+# MySQL. Versions 5.5.8 and up are supported.
+#
+# Install the MySQL driver
+# gem install mysql2
+#
+# Ensure the MySQL gem is defined in your Gemfile
+# gem "mysql2"
+#
+# And be sure to use new-style password hashing:
+# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
+#
default: &default
adapter: mysql2
encoding: utf8mb4
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
- password: <%= ENV.fetch("MYSQL_PASSWORD") %>
- socket: <%= ENV['MYSQL_SOCKET'] %>
+ socket: <%= ENV.fetch("MYSQL_SOCKET") { nil } %>
development:
<<: *default
database: arelpe_development
+ password: <%= ENV["MYSQL_PASSWORD"] %>
-# Note: completely standalone test config, NOT inheriting from default
test:
- adapter: mysql2
- encoding: utf8mb4
- collation: utf8mb4_0900_ai_ci
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
+ <<: *default
database: arelpe_test
- username: root
host: 127.0.0.1
production:
<<: *default
database: arelpe_production
- password: <%= ENV.fetch("MYSQL_PASSWORD") %>
- host: <%= ENV.fetch("MYSQL_HOST") %>
- username: <%= ENV.fetch("MYSQL_USERNAME") %>
+ password: <%= ENV["MYSQL_PASSWORD"] %>
+ host: <%= ENV.fetch("MYSQL_HOST") { "localhost" } %>
+ username: <%= ENV.fetch("MYSQL_USERNAME") { "root" } %>
socket: /run/mysqld/mysqld.sock