# P-SQL 命令整理 1. 启动psql ``` brew services start postgresql ``` 2. 停止psql ``` brew services start postgresql ``` 3. 重启psql ``` brew services restart postgresql ``` 4. 连接psql ``` psql -U postgres -h localhost -p 5432 -d postgres ``` | 参数 | 中文具体含义 | 英文具体含义 | -------- | -------- |-------- | | -U | 用户名 | User | | -h | 域 | Host | | -p | 端口号 | Port | | -d | 密码 | Password | ###### tags: `PostgreSQL`