rake db:create generated “if you set the charset manually, make sure you have a matching collation” error

前端 未结 2 755
北恋
北恋 2021-01-12 09:16

I got a rails project in version 2.3.8. When i tried to run rake db:create, the below error occured.

Couldn\'t create database for {\"encoding\"=>\"utf8\"         


        
2条回答
  •  一个人的身影
    2021-01-12 09:57

    I ran into the same error. In my case, the problem was that I hadn't created the MySQL user who was specified in database.yml.

    mysql --user=root mysql
    grant all privileges on *.* to 'user_name_here'@'localhost' identified by 'password_here';
    exit;
    

提交回复
热议问题