Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Cloud (MySql) #25

Open
priore opened this issue Apr 26, 2018 · 0 comments
Open

Google Cloud (MySql) #25

priore opened this issue Apr 26, 2018 · 0 comments

Comments

@priore
Copy link

priore commented Apr 26, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant