Skip to content

Commit 1386b1c

Browse files
committed
use 127.0.0.1 to avoid read error from nio
1 parent 98eae63 commit 1386b1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/MySQL/Database/MySQLDatabaseConfig.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
public struct MySQLDatabaseConfig {
33
/// Creates a `MySQLDatabaseConfig` with default settings.
44
public static func root(database: String) -> MySQLDatabaseConfig {
5-
return .init(hostname: "localhost", port: 3306, username: "root", database: database)
5+
return .init(hostname: "127.0.0.1", port: 3306, username: "root", database: database)
66
}
77

88
/// Destination hostname.
@@ -21,7 +21,7 @@ public struct MySQLDatabaseConfig {
2121
public let database: String
2222

2323
/// Creates a new `MySQLDatabaseConfig`.
24-
public init(hostname: String, port: Int = 3306, username: String, password: String? = nil, database: String) {
24+
public init(hostname: String = "127.0.0.1", port: Int = 3306, username: String, password: String? = nil, database: String) {
2525
self.hostname = hostname
2626
self.port = port
2727
self.username = username

0 commit comments

Comments
 (0)