I have this configuration:
development: adapter: mysql2 encoding: utf8 database: my_db_name username: root password: my_password host: mysql://127.0.0.1:3306
And I am getting this error:
Unknown MySQL server host 'mysql://127.0.0.1:3306' (1)
Is there something obvious that I am doing incorrectly?
The main databases. yml configuration file for a project can be found in the config/ directory. Most of the time, all applications of a project share the same database. That's why the main database configuration file is in the project config/ directory.
Rails comes with built-in support for SQLite, which is a lightweight serverless database application. While a busy production environment may overload SQLite, it works well for development and testing. Rails defaults to using a SQLite database when creating a new project, but you can always change it later.
You should separate the host from the port number. You could have something, like:
development: adapter: mysql2 encoding: utf8 database: my_db_name username: root password: my_password host: 127.0.0.1 port: 3306
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With