eve-doc/home.markdown

28 lines
456 B
Markdown
Raw Normal View History

2014-08-18 10:38:52 +00:00
## Database
### postgres
2014-08-18 11:34:22 +00:00
- Host: postgres
2014-08-18 10:40:34 +00:00
```bash
2014-08-18 10:39:07 +00:00
$ create-postgres-user-and-database foo bar # create user `foo` and give him access to database `bar`
2014-08-18 10:40:34 +00:00
```
2014-08-18 10:38:52 +00:00
2014-08-18 11:34:22 +00:00
Administration shell:
```bash
$ sudo psql -h postgres -u postgres
psql> \l # list databases
psql> \c <database> # connect to database
psql> \d # show tables
```
2014-08-18 10:38:52 +00:00
### mysql
2014-08-18 11:34:22 +00:00
- Host: mysql
2014-08-18 10:40:34 +00:00
```bash
$ create-mysql-user-and-database foo # create database and user `foo`
2014-08-18 11:34:22 +00:00
```