Wednesday, February 28, 2018

[google-cloud-sql-discuss] I want to update MYSQL Variable on Google cloud server

here is my error 


[Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

and here is my code


DROP FUNCTION IF EXISTS `SPLIT_STR`;
DELIMITER ;;
CREATE FUNCTION `SPLIT_STR`(x longtext,
  delim VARCHAR(12),
  pos INT) RETURNS varchar(255) CHARSET utf8
RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(x, delim, pos),
       LENGTH(SUBSTRING_INDEX(x, delim, pos -1)) + 1),
       delim, '')
;;
DELIMITER ;

--
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/fc9f7a20-922d-460d-a214-a1b293894bbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Advice/experience using micro & small instances

Hello, 

It is advised to choose a machine type with enough memory to hold your largest table for a better performance. You can read this FAQ here for maximum concurrent limits on both micro and small instances. But having said that, you can change an instance's tier at any time, with few seconds to minutes of downtime depending on the type of SQL you use [1], during when maintenance window is advised. 


[1] https://cloud.google.com/sql/pricing 


--
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/37fd2cf9-69f3-4bd5-b94e-3a7bbabb33c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Self Restart Cloud SQL??

Hello Eugene,

Please provide the following details in a private message to investigate it further:-


  1. Please confirm exact date and time when SQL instance was restarted and becomes unavailable.

  2. At what time cloud SQL instance becomes available again?

  3. Please provide me your project number and Cloud SQL instance name.

On Wednesday, February 28, 2018 at 9:04:32 AM UTC-5, Eugene wrote:
Hi,

I noticed that the instance of cloud sql was restarted and was unavailable for 2 minutes. During this time, the application could not access the database. In the operations it is indicated that an update was made. Such behavior as when editing an instance. The authorized employees did not make any changes.  Could it be database maintenance and how can I track this "update" ?

P.S.
CPU usage, Memory Usage, Disk usage - normal
Cloud SQL MySQL 5.7 - 2th generation

Thanks!

--
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/7b7fb028-12bf-439a-858c-8723b958a8fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Self Restart Cloud SQL??

Eugene,

your instance probably went into maintenance . You can configure the Maintenance window to avoid disruptive updates, and also Maintenance timing (whether you want updates early or late). Do you have turned on the HA option for that instance?

On 28 February 2018 at 11:58, Eugene <eugene.timmy@gmail.com> wrote:
Hi,

I noticed that the instance of cloud sql was restarted and was unavailable for 2 minutes. During this time, the application could not access the database. In the operations it is indicated that an update was made. Such behavior as when editing an instance. The authorized employees did not make any changes.  Could it be database maintenance and how can I track this "update" ?

P.S.
CPU usage, Memory Usage, Disk usage - normal
Cloud SQL MySQL 5.7 - 2th generation

Thanks!

--
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/c0675ec5-9d69-4aa6-9679-221d0293746e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

--
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/CALdDuQ4r4F%2BLAn%2Bi0PY6t1L8F%3DMBoNk20Zs_mb9j-LoSpm7iDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Self Restart Cloud SQL??

Hi,

I noticed that the instance of cloud sql was restarted and was unavailable for 2 minutes. During this time, the application could not access the database. In the operations it is indicated that an update was made. Such behavior as when editing an instance. The authorized employees did not make any changes.  Could it be database maintenance and how can I track this "update" ?

P.S.
CPU usage, Memory Usage, Disk usage - normal
Cloud SQL MySQL 5.7 - 2th generation

Thanks!

--
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/c0675ec5-9d69-4aa6-9679-221d0293746e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Advice/experience using micro & small instances

I have an SQL instance running, I've been pleased with the service so far but as a db-n1-standard-1 the cost is quite high for my usage level.

I went to downgrade and saw the warning that it is not recommended for production use.

I just wanted to know what your experiences were with the smaller options.

I'm perhaps in a bit of a niche - it's a production DB but with extremely low size and use. It maybe gets accessed by customers twice a week! We would never even come close to hitting the usage limits.

--
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/15c1b7ab-6f15-4b31-bb34-20c9c667ff28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, February 27, 2018

[google-cloud-sql-discuss] Re: High CPU instance types

Hello Andy,

Thank you for feedback. I'd recommend submitting the feature requests through Google Issue Tracker which is a dedicated place for tracking bugs and feature requests by Google Cloud Platform engineers.

Sincerely,





On Tuesday, February 27, 2018 at 3:14:38 PM UTC-5, Andy Shinn wrote:
It would be cool if there were some high CPU instance types (or even custom sizes like Compute Instances). My use case is for read replicas that don't need a lot of memory and have a much different usage pattern than the primary. 

--
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/bedf0e14-3303-4af0-9c49-98f0348de5c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] High CPU instance types

It would be cool if there were some high CPU instance types (or even custom sizes like Compute Instances). My use case is for read replicas that don't need a lot of memory and have a much different usage pattern than the primary. 

--
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/c4502c80-62e4-4ed3-b0b5-9b34c5bf914a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, February 24, 2018

[google-cloud-sql-discuss] Re: Cloud SQL Failover stuck in creation

Hello Silambarasan,


I can check with the backline team of how to retrieve it. Please privately reply to this message, including the project ID and the instance name.


Thank you

--
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/668eb90e-7eb2-4f92-83b2-199af4592517%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, February 23, 2018

[google-cloud-sql-discuss] Cloud SQL Failover stuck in creation

Hi Team,
I have created a Cloud SQL instance MySQL 2nd generation instance with a failover, the instance is available but the failover is still in "PENDING_CREATE" status for over 10 days. I tried restarting the MySQL instance but still no luck, please help me. 

Thanks & Regards
Venu

--
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/f7cf8aba-0b7c-47ce-a4da-9137575e3d9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, February 20, 2018

[google-cloud-sql-discuss] Re: Cannot connect using gcloud

Hi Stephen, 

You need to run the command using the flag "nmap  -Pn x.y.z.w".  If the command reports the port is being filtered, that probably means a firewall blocking the packets.

If you followed the steps provided by Fady, that should clear off the Google infrastructure. You should check your your local environment (antivirus firewall, etc).  To be sure you have whitelisted the appropriate IP on the Cloud SQL instance, you could use a 3rd party tool like this one. 

--
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/307d0ab7-b2c8-408c-9560-73eee08efa30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, February 19, 2018

[google-cloud-sql-discuss] Re: Cannot connect using gcloud

Hi Carlos. The ping responds successfully but the nmap returns:
nmap -Pn 35.195.x.x

Starting Nmap 7.01 ( https://nmap.org ) at 2018-02-19 20:53 GMT
Nmap scan report for 146.134.x.x.bc.googleusercontent.com (35.195.x.x)
Host is up.
All 1000 scanned ports on 146.134.x.x.bc.googleusercontent.com (35.195.x.x) are filtered

Nmap done: 1 IP address (1 host up) scanned in 201.43 seconds

When I try to specify port 3306 I get back:
nmap -p 3306 35.195.x.x

Starting Nmap 7.01 ( https://nmap.org ) at 2018-02-19 21:47 GMT
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.05 seconds

Kind regards,
Stephen

On Monday, 19 February 2018 18:02:14 UTC, Carlos (Cloud Platform Support) wrote:
Hi Stephen, 

Are you able to ping the IP address from your location?

If you install and run nmap against the IP of the server do you see the port opened? i.e.

nmap -Pn  w.x.y.z

Starting Nmap 6.47 ( http://nmap.org ) at 2018-02-19 18:00 UTC
Nmap scan report for....
Host is up (0.0014s latency).
Not shown: 999 filtered ports
PORT     STATE SERVICE
3306/tcp open  mysql



--
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/288a04d2-2e6c-432b-abe3-2cf25803197e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Cannot connect using gcloud

Hi Stephen, 

Are you able to ping the IP address from your location?

If you install and run nmap against the IP of the server do you see the port opened? i.e.

nmap -Pn  w.x.y.z

Starting Nmap 6.47 ( http://nmap.org ) at 2018-02-19 18:00 UTC
Nmap scan report for....
Host is up (0.0014s latency).
Not shown: 999 filtered ports
PORT     STATE SERVICE
3306/tcp open  mysql



--
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/5c904b36-9b38-47cf-bf49-da7f1131557a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

As SQL DB is accessible from other systems, it indicates issue lies in your website configuration. Have you checked the configuration in "settings.php" files as indicated in the previously shared post?


Going forward, can you please send me the complete error logs through private message?



On Sunday, February 18, 2018 at 7:47:46 PM UTC-5, Mote Net wrote:
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/fee5be8c-0142-4573-80d2-fbe110561979%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Cannot connect using gcloud

Thank you for your reply Fady. I have manually added my IP; which is the same viewed from both of the links you provided. Trying to connect with the mysql client yields the same response:

$ mysql -h 35.195.x.x  -u root -p
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '35.195.x.x' (110)

I followed the instructions in your first link [1] and have an ipv4 IP address for the database so the issues mentioned in the stackoverflow link shouldn't apply.

Regards,
Stephen

On Friday, 16 February 2018 22:54:45 UTC, Fady (Google Cloud Platform) wrote:

Hello Stephen,


Since you are able to connect through cloudshell using the same gcloud commands, I suspect it is an issue within your local machine. Generally, when this error is logged, it means that the Cloud SQL instance did not whitelist (authorize) your IP, but could also be an underlying networking issue. In your message, you mentioned that you can see an IP address being authorized. It could be that your true IP address is different (computer behind proxy). You may find your IP through following both scenarios in this document . Then, to isolate the issue you may try the following:


  1. Manually add your computer's IP address in the authorization list.

  2. use this command (gcloud uses the same client mysql command on your machine after the automatic whitelisting):


mysql -h <yourCloudSQLIP>  -u root -p


More troubleshooting steps can be found here [1] [2].You may also check these very similar issues at stackoverflow here [3] [4] . Furthermore,you may try other methods to connect using this guide. I hope this helps.

--
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/aab4162e-b020-4a73-b2e3-e9ff0acf866d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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.

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

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/9135c1d0-11ad-4c10-9b4f-29c5f8d46dc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, February 16, 2018

[google-cloud-sql-discuss] Re: Cannot connect using gcloud

Hello Stephen,


Since you are able to connect through cloudshell using the same gcloud commands, I suspect it is an issue within your local machine. Generally, when this error is logged, it means that the Cloud SQL instance did not whitelist (authorize) your IP, but could also be an underlying networking issue. In your message, you mentioned that you can see an IP address being authorized. It could be that your true IP address is different (computer behind proxy). You may find your IP through following both scenarios in this document . Then, to isolate the issue you may try the following:


  1. Manually add your computer's IP address in the authorization list.

  2. use this command (gcloud uses the same client mysql command on your machine after the automatic whitelisting):


mysql -h <yourCloudSQLIP>  -u root -p


More troubleshooting steps can be found here [1] [2]. Also, you may also very similar issues at stackoverflow here [3] [4] You may also try other methods to connect through this guide. I hope this helps.

--
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/98b5ffdc-c67b-4440-a825-4600637ce720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Cannot connect using gcloud

I can list the databases in my Cloud SQL instance but I can't connect to it.


gcloud beta sql databases list --instance=dbinstance
NAME CHARSET COLLATION
information_schema utf8 utf8_general_ci
main utf8 utf8_general_ci
mysql utf8 utf8_general_ci
performance_schema utf8 utf8_general_ci


I can see my local machine being added to the authorisation list via the console. But it's failing to connect:


gcloud beta sql connect dbinstance --user=root
Whitelisting your IP for incoming connection for 5 minutes...done.
Connecting to database with SQL user [root].
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (110)


It isn't configured to use SSL. Actually, this is a newly created instance so I'm happy to try any suggestions regardless of how drastic they are. I can connect in this way from the gcloud command line within the console.

--
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/d2442413-e17f-476e-9def-abdeffc9c4e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, February 15, 2018

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

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/17b2d02d-c94b-4a03-9c63-cdfe7f852d80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Increasing the open db connection on MySQL CloudSQL instance(MySQL 2nd Gen 5.7)

Cloud SQL supports MySQL 5.6 and 5.7. The most recent minor upgrade, listed in the release notes, was to 5.6.

--
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/31864be3-e539-4e42-b21b-218abe9f9205%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wednesday, February 14, 2018

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

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/dfd4f55d-d9b8-4c46-acfb-779cc58b9736%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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/e1d957be-4f28-4635-b17d-e28bd1196289%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Recent Name Server Change, website can no longer connect to Google Cloud SQL instance

Hi all,

Prior to a recent name server change for our website, we have had no issues in using the Google Cloud SQL system for our database needs. However, once the name server change was complete, our website no longer connects to our database, giving us a SQLSTATE[HY000] [2003] Connection refused (111 error). We have made sure that our website's new IP is listed in our Authorised list, but this has not helped. We have also made sure with our server provider that they are not blocking our database's IP address/port. Are there any suggestions on how to solve 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/9e243e74-531e-4daf-8db5-de8259c0abca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Increasing the open db connection on MySQL CloudSQL instance(MySQL 2nd Gen 5.7)

For the Second Generation instances, the maximum number of concurrent connections for MySQL is 4000 and it depends on the machine type of SQL instance. For better performance, you may modify the machine type configuration and storage to hold your largest table.

You should also noted that the latest version of MySQL which is supported by Cloud Platform is version 5.6.

For diagnosing the issue occurring when your concurrent connections reach 45, you may check this documentation ( For example you can use SHOW PROCESSLIST command from a MySQL client to find out what is happening on an instance)

If you still have some questions with regards to Cloud SQL, you may check this link for the Cloud SQL FAQ. For specific technical questions, I recommend that you ask your question on Stack Overflow using one of the tags monitored by our community technical support team[4], since there would be more visibility on it.


--
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/2dd45c0d-d546-47cb-8b3f-05c6b7442539%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, February 13, 2018

[google-cloud-sql-discuss] Re: How to know if throttling occured?

Is this saying that active throttling might occur if I max out the CPUs?

Yes. Per this doc, if CPU utilization is over 98% for 6 hours, your instance is not properly sized for your workload.
 
If so, how do I find out whether I am being throttled?

You can monitor the Read/Write operations metric, Seconds Behind Master, or the CPU utilization (as you posted) from the GCP Console to indicate whether throttling is occurring. To monitor these usages and receive alerts at a specified threshold, set up a Stackdriver alert

--
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/e56d8160-e39e-4b58-b072-2cbca34b7229%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] How to know if throttling occured?

Hi all,

I have a question regarding Postgres SQL.

A long-running query ran three times over the last couple of days. The first time it took about 20 minutes, the next time about 4 hours, the last time, well (my measurement timed out), longer than 4 hours.

Now I am working my way through https://cloud.google.com/sql/docs/postgres/diagnose-issues and stumbled across this line:

If your workload consists of CPU intensive queries (sorting, regexes, other complex functions), your instance might be throttled; add vCPUs.

Is this saying that active throttling might occur if I max out the CPUs?
If so, how do I find out whether I am being throttled?

The reason I am asking is that over the last couple of days my CPU usage did look like this (and my slow queries occured after the big 95% block). After the block no query bumps the load over 20%...

 

Thanks!
Stephan

--
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/62da476d-5f3e-440c-b141-3b22bc4f7a9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Cannot update "Authorised networks" on Cloud SQL MySQL instance

Thanks for your feedback. The permission warning on console looks like a cosmetic bug and you may want to raise it via Google public Issue Tracker (PIT) platform [1]. PIT meant for reporting and tracking customer issue, bugs and feature requests.


[1]: https://issuetracker.google.com



On Tuesday, February 13, 2018 at 5:21:07 AM UTC-5, Daniel Brown wrote:
Thanks for your response Dinesh,
Updating via gcloud command on cloud console worked fine. In addition, After updating via command I can now update via the UI. 

The permission warning still remains although is not enforced:



Thanks for your help,

Dan Brown



On Monday, February 12, 2018 at 7:26:08 PM UTC, Dinesh (Google Platform Support) wrote:

Hello Daniel,


I tried to reproduce your issue but unable to do so as I can successfully update network under SQL Authorized networks. Going forward, can you please share the screenshot of the error message observed?


Moreover, you may want to try gcloud command [1] to update authorized network for your SQL instance.


[1]: https://cloud.google.com/sdk/gcloud/reference/sql/instances/patch


On Monday, February 12, 2018 at 9:02:40 AM UTC-5, Daniel Brown wrote:
Hi, I'm attempting to update the 'Authorised Networks' on a MySQL instance.
Upon hover of the 'Add network' button I see the text 'You don't have permission to edit authorised networks on this instance.'.
When attempting to save changes I get the error message 'Could not complete the operation'.


I have checked that I have the owner role for the project. This is an operation I was able to perform last week.
Am I missing something or does this appear to be a bug?

Many Thanks,
Dan

--
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/d9ab0678-229c-4fd4-98c5-3af2c8b5bf4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.