升级Homebrew中的PostgreSQL

• 本文约143字,阅读大致需要1分钟Dev Notes

最后还是入手了新版的MBP,开发环境都是重新设置的,用PostgreSQL的时候,启动提醒版本不兼容

FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.5, which is not compatible with this version 9.6.2.

所以要升级一下原来的库,作弊条开始

  • brew services stop postgresql
  • brew install [email protected]
  • initdb /usr/local/var/postgres9.6 -E utf8
  • 开始升级数据库
  • mv /usr/local/var/postgres /usr/local/var/postgres9.5
  • mv /usr/local/var/postgres9.6 /usr/local/var/postgres
  • brew services start postgresql

完成

搜索文章…(按ESC退出)