mirror of
https://github.com/minio/minio
synced 2024-11-02 21:47:23 +00:00
Makes mandatory dsn_string parameter optional (#8931)
This commit is contained in:
parent
fa4d627b57
commit
fdda5f98c6
2 changed files with 8 additions and 3 deletions
|
@ -364,6 +364,7 @@ var (
|
|||
config.HelpKV{
|
||||
Key: target.MySQLDSNString,
|
||||
Description: "MySQL data-source-name connection string",
|
||||
Optional: true,
|
||||
Type: "string",
|
||||
},
|
||||
config.HelpKV{
|
||||
|
|
|
@ -979,7 +979,7 @@ MINIO_NOTIFY_MYSQL_QUEUE_LIMIT (number) maximum limit for undeliver
|
|||
MINIO_NOTIFY_MYSQL_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
`dsn_string` is optional, if not specified, the connection information specified by the `host`, `port`, `user`, `password` and `database` parameters are used.
|
||||
`dsn_string` is optional. If not specified, the connection information specified by the `user`, `password`, `host`, `port`, and `database` parameters are used. `dsn_string` is formed as `"<user>:<password>@tcp(<host>:<port>)/<database>"`
|
||||
|
||||
MinIO supports persistent event store. The persistent store will backup events if MySQL connection goes offline and then replays the stored events when the broken connection comes back up. The event store can be configured by setting a directory path in `queue_dir` field, and the maximum number of events, which can be stored in a `queue_dir`, in `queue_limit` field. For example, `queue_dir` can be set to `/home/events` and `queue_limit` can be set to `1000`. By default, the `queue_limit` is set to `10000`.
|
||||
|
||||
|
@ -987,13 +987,17 @@ Before updating the configuration, let's start with `mc admin config get` comman
|
|||
|
||||
```sh
|
||||
$ mc admin config get myminio/ notify_mysql
|
||||
notify_mysql:myinstance table="" database="" format="namespace" password="" port="" queue_dir="" queue_limit="0" username="" dsn_string="" host=""
|
||||
notify_mysql:myinstance enable=off format=namespace host= port= username= password= database= dsn_string= table= queue_dir= queue_limit=0
|
||||
```
|
||||
|
||||
Use `mc admin config set` command to update MySQL notification configuration for the deployment.
|
||||
|
||||
```sh
|
||||
$ mc admin config set myminio notify_mysql:myinstance table="minio_images" database="miniodb" format="namespace" password="" port="3306" queue_dir="" queue_limit="0" username="root" dsn_string="" host="172.17.0.1"
|
||||
$ mc admin config set myminio notify_mysql:myinstance table="minio_images" username="root" password="xxxx" host="172.17.0.1" port="3306" database="miniodb"
|
||||
```
|
||||
or with `dsn_string` parameter;
|
||||
```sh
|
||||
$ mc admin config set myminio notify_mysql:myinstance table="minio_images" dsn_string="root:xxxx@tcp(172.17.0.1:3306)/miniodb"
|
||||
```
|
||||
|
||||
Note that, you can add as many MySQL server endpoint configurations as needed by providing an identifier (like "myinstance" in the example above) for each MySQL instance desired.
|
||||
|
|
Loading…
Reference in a new issue