AWScloud9によるrails環境構築でrails db:createをする際にこのようなエラーが出てしまいます。
解決方法についてご教授いただけると幸いです。
エラーコード
ec2-user:~/environment/RailsReactApp (master) $ rails db:create
/home/ec2-user/.rvm/gems/ruby-2.7.5/gems/activerecord-6.1.7/lib/active_record/database_configurations.rb:234:in `build_db_config_from_string': '{ socket => /var/lib/mysql/mysql.sock }' is not a valid configuration. Expected '/var/lib/mysql/mysql.sock' to be a URL string or a Hash. (ActiveRecord::DatabaseConfigurations::InvalidConfigurationError)
database.yml
default: &default
adapter: mysql2
encoding: utf8mb4
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password:
socket: /var/lib/mysql/mysql.sock
development:
<<: *default
database: RailsReactApp_development
test:
<<: *default
database: RailsReactApp_test
production:
<<: *default
database: RailsReactApp_production
username: RailsReactApp
password: <%= ENV['RAILSREACTAPP_DATABASE_PASSWORD'] %>