Mac安装postgresql和卸载PostgreSQL
1、homebrew安装
brew install postgresql
2、初始化
initdb /usr/local/var/postgres
3、创建数据库及查看数据库
(1)先创建db、
createdb
(2)进入控制台
psql
(3)查看现有数据库
\l
4、创建用户
CREATE USER postgres WITH PASSWORD 'XXXXXX';
5、删除默认生成的数据库
DROP DATABASE postgres;
6、创建postgres用户的postgres数据库
CREATE DATABASE postgres OWNER postgres;
7、将postgres设置为postgres的权限
GRANT ALL PRIVILEGES ON DATABASE postgres to postgres;
8、postgres用户添加创建数据库权限
ALTER ROLE postgres CREATEDB;
9、用户登陆控制台
psql -U postgres -d postgres
10、卸载homebrew安装的PostgreSQL
brew uninstall postgresql
Mac安装postgresql和卸载PostgreSQL的更多相关文章
- centos安装卸载Postgresql数据库PGSQL10
这几天ytkah正在测试Odoo,而Odoo12一定要PGSQL10否则安装数据库的时候会出错,所以就直接安装gpsql10.首先卸载旧版本postgresql yum remove postgres ...
- centos安装与卸载postgresql
1.卸载旧版本postgresql $ yum remove postgresql* 2.更新yum $ yum update 3.下载pgdg-centos92-9.2-6.noarch.rpm,或 ...
- 卸载postgresql数据库
卸载postgresql数据库有两种方法,第一种一个个包卸载,第二种全部卸载.做这些之前请先做好备份,以防意外! 1.1.查询出postgres数据库,用命令rpm -qa |grep postgre ...
- 苹果mac电脑中brew的安装使用及卸载详细教程
brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令, 非常方便 brew类似ubuntu系统下的apt-get的功能 安装br ...
- Ubuntu 安装配置最新版 PostgreSQL
环境:Ubuntu Xenial (16.04) !!! CentOS 参考这里 #安装 PostgreSQL sudo apt-get updatesudo apt-get upgradea ...
- mac安装卸载brew
1.安装 访问https://brew.sh,copy图中的命令到命令行中,进行下载安装 2.卸载 官方版本的卸载: /usr/bin/ruby -e "$(curl -fsSL https ...
- mac 安装 swoole 可能会出现的错误
请先看完之后再操作 一.用pecl安装swoole(没有安装起来) 2018年4月,由于homebrew的变动,导致无法使用brew install的方式安装php的扩展,现在改为用pecl安装,pe ...
- mac 安装 nginx 环境
1.brew search nginx 2.brew install nginx 启动nginx ,sudo nginx ;访问localhost:8080 发现已出现nginx的欢迎页面了. 备注: ...
- Mac安装python3.x+pycharm+elasticsearch+常见报错处理(1)
---恢复内容开始--- mac安装python有两种方式:此处叙述官网安装下载. mac 自带python2.x版本,python2和3之间的差距还是有的.下面简单叙述我安装python3.7的过程 ...
随机推荐
- VC/DDK/DriverWorks开发环境配置
1·前言开发windows内核驱动程序是一个非常具有挑战性的工作,你得忍耐调试过程中操作系统 不断蓝屏.不断崩溃的噩梦,所以强烈建议你采用虚拟机做开发平台,这样即使把整个系统都搞蹦了,大不了从新装过虚 ...
- 浅谈神经网络中的bias
1.什么是bias? 偏置单元(bias unit),在有些资料里也称为偏置项(bias term)或者截距项(intercept term),它其实就是函数的截距,与线性方程 y=wx+b 中的 b ...
- nodejs基础 用http模块 搭建一个简单的web服务器 响应JSON、html
前端在开发中,大多会想浏览器获取json数据,下面来用nodejs中的http模块搭建一个返回json数据的服务器 var http = require("http"); var ...
- go之构造体方法
package main import ( "fmt" "math" ) type Vertexs struct { X, Y float64 } //Abs ...
- centos7中oracle数据库安装和卸载
参考: 完全命令行安装(验证可行):https://jingyan.baidu.com/article/90895e0f29c92164ec6b0bd1.html 存在疑问:是否需要jdk的配置(因为 ...
- Nginx 出现 403 Forbidden 最终解决方法
Nginx 出现 403 Forbidden 最终解决 步骤一: 检查目录权限.权限不足的就加个权限吧. 例子:chmod -R 755 / var/www 步骤二: 打开nginx.conf 例子: ...
- hey is a tiny program that sends some load to a web application.
hey is a tiny program that sends some load to a web application. DOS attack DOS攻击生成 https://github.c ...
- java后台服务器向Nodejs客户端发送压缩包文件
java代码: Map map=new HashMap(); try { //获取本地文件转换成字符换 File file = new File(apppath);//"D:/upload/ ...
- as 什么意思?
You can denote particular console messages and variable values as having different types using four ...
- unfortunately 遗憾的是
Yet,unfortunately,when it comes to the time for you to talk about these topics in English,......(unf ...