I am trying to deploy a rails app on AWS by referring to the following article.
In the item "MySQL settings", I noticed that the DB was created with MySQL, and I am trying to recreate the database of the application.
I've tried the following methods, but I'm not sure where the problem is.
I'm sorry for the beginner's question, but could you please help me to deploy it safely?
Thank you.

Where the error occurred

$sudo service mysqld start
→ Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit not found.

Database.yml after trying to use mysql2 only for production environment referring to the article

  adapter: sqlite3
  pool:<% = ENV.fetch ("RAILS_MAX_THREADS") {5}%>
  timeout: 5000
<<: * default
  database: db/development.sqlite3
test: test:
<<: * default
  database: db/test.sqlite3
  adapter: mysql2
  encoding: utf8
  pool:<% = ENV.fetch ("RAILS_MAX_THREADS") {5}%>
  database: zimotoai_app_production
  username: zimotoai_app
  password: password:
What I tried

I checked if MariaDB was uninstalled and MySQL was installed by referring to the following article.
After that, I was wondering if the article would solve the problem, so I decided to ask a question.

Postscript (How about the method of the following article?)

Production environment database creation
[ec2-user @ ip-172-31-23-189] $cd/var/www/app name/releases
[ec2-user @ ip-172-31-23-189] $ll
A folder with the name of the number representing the date is displayed Example: 20200218063515
cd bottom number # =>Example cd 20200218063515
[ec2-user @ ip-172-31-23-189] $rails db: create RAILS_ENV = production
=>Created database''
[ec2-user @ ip-172-31-23-189] $rails db: migrate RAILS_ENV = production

  • Answer # 1

    I was able to refer to the following article for starting mysql.

    However, I couldn't execute rake db: create RAILS_ENV = production after that, so I asked a question.
    I would appreciate it if you could answer. Thank you.