――Mr. Ito, who is famous for cherry books, has written a very easy-to-understand article, so please have a look there. - https://qiita.com/jnchito/items/e23b1facc72bd86234b6
--For Rails, you don't have to execute queries or change MySQL settings! Just rewrite it as follows! --Note that the changes will not be reflected if you use rails db: reset! --Execute rails db: drop and rails db: create --Maybe you can also use rails db: migrate: reset.
config/database.yml
default: &default
adapter: mysql2
encoding: utf8mb4
charset: utf8mb4 #Postscript
collation: utf8mb4_bin #Postscript
reconnect: false
Recommended Posts