Have you tried this ssl_mode: 'DISABLED'?
johndoe_dev: &johndoe_dev
adapter: mysql2
database: the_wagon
pool: 25
socket: /tmp/mysql.sock
host: localhost
timeout: 5000
username: myuser
password: password
encoding: utf8mb4
collation: utf8mb4_unicode_ci
variables:
sql_mode: TRADITIONAL
ssl_mode: 'DISABLED'
development:
<<: *johndoe_dev