Perfect-MySQL
Perfect-MySQL copied to clipboard
Google Cloud (MySql)
how can I use MySQLDatabaseConfiguration to connect to a Google Cloud that requesting certificates?
I used it to connect to a local database, but I don't understand how I can connect to a Google remote databases that required the certificates?
I already have the certificates but I don't understand how to configure connection with Perfect to use them.
below the standard example without certificates:
do {
let config = try MySQLDatabaseConfiguration(database: "MYDB", host: "localhost", port: 3306, username: "root", password: "root123")
let db = Database(configuration: config)
let tblUser = db.table(User.self)
let query = try? tblUser.select()
print(query)
} catch {
print(error)
}
Thanks.