Thursday, November 15, 2018

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

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/f5c0e4b1-9198-41e9-b87e-64f93b8a32bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment