Sunday, October 6, 2013

Re: Error with $conn = mysql_connect(":/cloudsql/...

<?php 
 // Connects to your Database 
 mysql_connect(":/cloudsql/abcategories-com:authorbooksdatabase", "username", "password") or die(mysql_error()); 
 mysql_select_db("abc") or die(mysql_error()); 
 ?> 

On Monday, October 7, 2013 6:54:45 AM UTC+2, Razvan Musaloiu-E. wrote:
mysql_error() is a PHP function you can call after mysql_connect [1]. Do you mind showing us the code you use to connect?



On Sun, Oct 6, 2013 at 9:20 PM, Hans Simtanda Caspersen <ad...@simtanda.com> wrote:
I have attached another log file form mysql prompt and there is no errors regarding connect


On Monday, October 7, 2013 6:11:07 AM UTC+2, Razvan Musaloiu-E. wrote:
What does mysql_error() says?

-- Razvan ME


On Sun, Oct 6, 2013 at 9:02 PM, Hans Simtanda Caspersen <ad...@simtanda.com> wrote:
I have attached a log and it seems that there is no error or what?


On Monday, October 7, 2013 5:47:32 AM UTC+2, Razvan Musaloiu-E. wrote:
The '/cloudsql/...' only works on app server (and not dev app server). What error do you see in the appengine logs for your application?

-- Razvan ME


On Sun, Oct 6, 2013 at 8:22 PM, Hans Simtanda Caspersen <ad...@simtanda.com> 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/1962436c-80e3-4043-9a85-200694833f40%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/5114b26f-f5c5-4949-bf24-19e04f6cc2e1%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
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/08dffffd-20db-4ec4-8a0c-fc9921ddeb54%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
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/0bc09ca0-5c72-44f6-9bbf-5a7bdba72274%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment