Postgresql 无法混合使用exto.create、role';博士后';不存在
我尝试创建一个名为postgres的用户。我通过brew重新安装了postgres。我能用它运行Postgresql 无法混合使用exto.create、role';博士后';不存在,postgresql,elixir,phoenix-framework,ecto,Postgresql,Elixir,Phoenix Framework,Ecto,我尝试创建一个名为postgres的用户。我通过brew重新安装了postgres。我能用它运行 postgres-D/usr/local/var/postgres 当我运行mix EXTO.create时,仍然会出现以下错误: ~/code/blog_phoenix:.mix ecto.create ** (Mix) The database for BlogPhoenix.Repo couldn't be created, reason given: psql: FATAL: role "
postgres-D/usr/local/var/postgres
当我运行mix EXTO.create时,仍然会出现以下错误:
~/code/blog_phoenix:.mix ecto.create
** (Mix) The database for BlogPhoenix.Repo couldn't be created, reason given: psql: FATAL: role "postgres" does not exist.
~/code/blog_phoenix:.
您的数据库安装似乎缺少角色
postgres
您应该尝试使用默认凭据进行连接,然后执行SQL语句来创建角色及其默认数据库
在控制台运行中:
$ psql
然后
这不是一个重复的问题,因为这是一个特定于Phoenix框架的问题。
CREATE USER postgres SUPERUSER;
CREATE DATABASE postgres WITH OWNER postgres;