Hello Aminu,
You may consider something similar to:
$dsn = "/cloudsql/PROJECT:REGION:INSTANCE;dbname=DATABASE";
$user = "USER";
$password = "PASSWORD";
$db = new PDO($dsn, $user, $password);
Alternatively, you could set relevant environment variables in the app.yaml configuration file, and using these variables:
env_variables:
MYSQL_USER: root
MYSQL_PASSWORD: "*****"
MYSQL_DSN: mysql:dbname=DBNAME;unix_socket=/cloudsql/INSTANCE_NAME
This discussion group is oriented more towards general opinions, trends, and issues of general nature touching App Engine and Cloud SQL. For coding and programming architecture, as well as setting up PDO connectivity, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help.