Sunday, February 18, 2018

[google-cloud-sql-discuss] Re: Website cannot connect to Google Cloud SQL post name server change

Also forgot to add, yes the SQL DB is accessible from any other system we use, just not our website.

On Monday, February 19, 2018 at 8:46:54 AM UTC+8, Mote Net wrote:
I should clarify that we are using wordpress and that this isn't the wordpress database in use. This is a database for some additional data used by some content on our website.

On Friday, February 16, 2018 at 1:24:38 AM UTC+8, Dinesh (Google Platform Support) wrote:

Hello,


Are you trying to say that SQL DB is accessible using other systems? You may test this by trying to connect SQL DB from any DB client tool on the remote network.

Looking at the error message, have you updated contents of the 'settings.php' post changes? You may want to follow recommendations suggested in this document[1]


[1]:https://www.drupal.org/forum/support/post-installation/2011-07-19/pdoexception-sqlstatehy000-2003-cant-connect-to-mysql



On Thursday, February 15, 2018 at 9:01:20 AM UTC-5, Mote Net wrote:
I should add the specific error being reported: 

<br />

<b>Fatal error</b>:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (111 &quot;Connection refused&quot;)' in /home/XX/public_html/wp-content/themes/theme/page-templates/Devices.php:22

Stack trace:

#0 /home/XX/public_html/wp-content/themes/theme/page-templates/Devices.php(22): PDO-&gt;__construct(dsn,user,pass)

#1 /home/XX/public_html/wp-includes/template-loader.php(74): include('/home/XX/publ...')

#2 /home/XX/public_html/wp-blog-header.php(19): require_once('/home/XX/publ...')

#3 /home/XX/public_html/index.php(17): require('/home/XX/publ...')

#4 {main}

  thrown in <b>/home/XX/public_html/wp-content/themes/theme/page-templates/my_template.php</b> on line <b>XX</b><br />

Private information scrubbed where appropriate


On Thursday, February 15, 2018 at 11:36:19 AM UTC+8, Mote Net wrote:
Hi all,

Up until recently we have been successfully using the Google Cloud SQL in one of our projects and have been able to present the data on our website. However, after a recent name server change with our server providers, our website can no longer connect to the database. I have confirmed that it is accessible using other systems, and we made sure that the new IP address is listed in the authorised list. SSL on or off doesn't seem to matter.
Are there any suggestions on how to fix this problem?

--
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/13f25c09-527f-4a7c-adbc-d695d7f7240b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment