How did you get the mysqli function to work when deployed. I am getting an 
error Warning: mysqli::__construct(): (HY000/2002): Connection timed

I detailed the problem here 
https://stackoverflow.com/questions/44708684/cannot-use-mysqli-in-php-flex-env-on-app-engine

any tips on how you set this up to get it to work? 

On Wednesday, November 4, 2015 at 4:00:51 PM UTC-7, Terence Ramos wrote:
>
> I'm completely new to GAE development. I'm just trying to connect to the 
> Cloud SQL instance I created for my App Engine PHP application. My php file 
> is a bare bones:
>
> <?php
>
>
> // Using mysqli (connecting from App Engine)
>
> $sql = new mysqli(
>   null, // host
>   'root', // username
>   '',     // password
>   '', // database name
>   null,
>   '/cloudsql/my-app-id:my-sql-db'
>   );
>
> My application does have permission to use the cloud sql instance. The 
> issue is this seems to work when deployed, but locally it doesn't. I get: 
>
> Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /
> Users/myuser/Work/projects/default/index.php on line 23
> indexaction
>
> The GAE PHP help files don't seem to help. They state something like, see 
> above for how to use GAE locally with the book sample. But the sample above 
> in the web site is the Hello, world! Does anyone know where I can find 
> information on this, or how to do this?
>
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/bb104ad0-b315-4d13-b235-5c28139b650a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to