Create a new phoenix project with MySQL database
If you do not have Erlang, Elixir and Phoenix installed, follow this installation guide to do so.
Once the installation is complete, open your terminal and go to the folder/directory where you want to add the new project. Type in the following command to create the project:
Once the installation is complete, open your terminal and go to the folder/directory where you want to add the new project. Type in the following command to create the project:
mix phx.new <project_name> --database mysql
The "--database mysql" takes care of using the MySQL database adapter.
After the project is created, change DB credentials in /config/dev.exs file inside the project.
When ready, cd into the project folder and run the following command to create the database:
mix ecto.create
Once the database is created, you can start the Phoenix server to test your setup:
mix phx.server
If everything is configured correctly, you will see this screen when you go to "http://localhost:4000" in your browser:

All done!
If you want to learn about other options that you can use when creating a project, for example, to skip configuration of Phoenix LiveView or to skip TailwindCSS dependencies, check out this hexdoc.