From 0414166e3ac7a2407822d3f5b05ed9fcafb17fec Mon Sep 17 00:00:00 2001 From: Genki Mine Date: Wed, 16 May 2018 22:24:45 -0700 Subject: [PATCH] Add required parameters for MySQLDatabaseConfig --- 3.0/docs/mysql/fluent.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/docs/mysql/fluent.md b/3.0/docs/mysql/fluent.md index 9f6f744d..dd8d63e1 100644 --- a/3.0/docs/mysql/fluent.md +++ b/3.0/docs/mysql/fluent.md @@ -124,7 +124,7 @@ You can of course override this config struct if you have non-standard credentia ```swift /// Register custom MySQL Config -let mysqlConfig = MySQLDatabaseConfig(hostname: "localhost", port: 3306, username: "vapor") +let mysqlConfig = MySQLDatabaseConfig(hostname: "localhost", port: 3306, username: "vapor", password: "mypassword", database: "mydatabase") services.register(mysqlConfig) ``` @@ -166,4 +166,4 @@ router.get("mysql-version") { req -> Future in In the above example, `withPooledConnection(to:)` is used to create a connection to the database identified by `.mysql`. This is the default database identifier. See [Fluent → Database](../fluent/database.md#identifier) to learn more. -Once we have the `MySQLConnection`, we can perform a query on it. You can learn more about the methods available in [MySQL → Core](core.md). \ No newline at end of file +Once we have the `MySQLConnection`, we can perform a query on it. You can learn more about the methods available in [MySQL → Core](core.md).