Last active
January 2, 2016 11:19
-
-
Save cnevinc/8295919 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Production on Google Cloud SQL | |
$db = new PDO('mysql:unix_socket=/cloudsql/regal-center-453:guestbook;dbname=guestbook;charset=utf8','root', ''); // 不用指定密碼因為已經給該project/application權限 | |
// Development on Local Machine | |
$db = new PDO('mysql:host=localhost;dbname=guestbook'); // 我沒指定帳號密碼因為我GRANT ALL ON *.* to '@locahost' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment