Monday, November 19, 2018

[google-cloud-sql-discuss] Re: Error with $conn = mysql_connect(":/cloudsql/...

Hello,

I believe that your questions should get a better assistance in the Stack Overflow[1] since it is related to a technical issue. There, you should receive help from the community fellow enthusiasts, and from Google engineers when you add a tag in your post according to the product where you require assistance, as you can check in our documentation[2]. Additionally, you can post some details regarding your setup, project config, and some code samples.

[1] http://stackoverflow.com/
[2] https://cloud.google.com/support/docs/stackexchange

On Thursday, November 15, 2018 at 11:07:03 AM UTC-5, Sandip Mavani wrote:
same issue but i have different error.

$connstr = ':/cloudsql/instancename';
$link = mysql_connect($connstr,'useraname','password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';

No such file or directory

but same working in pdo

and this is necessary to user mysql_connect.



On Monday, October 7, 2013 at 8:52:41 AM UTC+5:30, Hans Simtanda Caspersen wrote:
Hi, 

im working at http://abcategories-com.appspot.com/ and i am ALSO using this script: 

<?php $conn = mysql_connect(":/cloudsql/abcategories-com:authorbooksdatabase", "username", "password"); ?> 

...to connect to my Cloud SQL, but i am getting no reaction online! 

And on my local web server (PHP SDK) i am getting the following error: 

Warning: mysql_connect(): No connection could be made because the target machine actively refused it. in C:\Google APP Sites\ABCategories\helloworld.php on line 21

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/cd56f399-6fc1-45fd-bd76-7799b3de482a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment