php-censor/docs/en/plugins/mysql.md

36 lines
658 B
Markdown
Raw Permalink Normal View History

2016-07-19 11:12:28 +02:00
Plugin MySQL
2017-01-04 13:22:20 +01:00
============
2016-07-19 11:12:28 +02:00
2016-07-17 16:20:35 +02:00
Connects to a given MySQL server and runs a selection of queries.
2016-07-19 11:12:28 +02:00
Configuration
2017-01-04 13:22:20 +01:00
-------------
2016-07-19 11:12:28 +02:00
### Examples
2016-07-17 16:20:35 +02:00
```yaml
build_settings:
mysql:
host: 'localhost'
user: 'testuser'
pass: '12345678'
setup:
mysql:
- "CREATE DATABASE my_app_test;"
complete:
mysql:
- "DROP DATABASE my_app_test;"
```
Import SQL from file:
```yaml
setup:
mysql:
import-from-file: # This key name doesn´t matter
import:
database: "foo" # Database name
file: "/path/dump.sql" # Relative path in build folder
```