Google Cloud SQL access network - mysql

In the Google Cloud console: MySQL-> myInstance-> Connectivity-> Authorized networks
I need to add an IP for my PC. SAVE gives me a message:
Operation failed: Invalid request: disk size can only be set for Second Generation instances..
How can I avoid this error? I didn't change the disk dimension.
I need to do the data export necessary to upgrade MySQL.

I'm 99% sure it's not the version of MySQL that's the issue, it's the version of Cloud SQL instance. See here: https://cloud.google.com/sql/docs/mysql/deprecation-notice for more information about the deprecation of first generation instances. It's still "supported" (ish) until March 2020, but more and more of these kinds of problems are likely to crop up.
As previous folks in the comments said, you should be able to create a ticket to help with the authorized issue to get you past that, but it's just going to be a bandaid. Miguel is right, you will need to transition to a second generation Cloud SQL instance.
Edit: For completeness, Here's the link on how to upgrade your instance that Miguel posted:
https://cloud.google.com/sql/docs/mysql/upgrade-2nd-gen

The first generation is closed and "Connections" cannot be configured. The MySQL generation upgrade has solved the problem.

Related

Unable to find all issues through SonarQube WS API

Goal: Export all SonarQube issues for a project to JSON/CSV.
Approach 1: Mine the sonar mysql database
Approach 2: Use the SonarQube WS API
First I was motivated to go for approach-1, but having discussion with the SonarQube core developer community I got the impression not to touch the database at any situation.
Thus I proceed with approach-2 and developed scripts to get issues. However, later I found that through WS-API, I can get upto 10000 issues which does not meet my goal.
Now I am convinced that the approach-1 i.e., mining the database is best for me. When looking at the "issues" table in sonar db, I have the following question.
Question. What is the format/encoding of the "location" field and how can I decode it from python/java?
Extracting data from database is not recommended at all. Schema and content frequently changes. Each upgrade may break your SQL request. Moreover it contains binary data (issue location) which can't be parsed as-is.
The only way to get data is through web services. If api/issues/search faces a limitation that you consider as critical, then you should explain your functional need to the SonarQube google group.

Error in google cloud compute engine: can't select machine type for new instance

I am creating a new instance and the CPU dropdown seems to be broken, check a screencast here: https://drive.google.com/file/d/0B3AG2ilJVv-JajNCM0xkSEpFa0E/view
This is not a very satisfying answer, but Google support has confirmed that they already have a bug logged for this (EDIT: There is currently no ETA for a fix.Google informed me that they deployed a fix. Unfortunately I couldn't test it personally because I had already converted to a full account which got around the problem.). The workaround they suggested is to use the gcloud command line tool, which of course is a tedious solution. Until they fix it, here are some tips for using gcloud.
List of available machine types plus zones:
gcloud compute machine-types list
List of zones:
gcloud compute zones list
The create command has a million options, but it starts gcloud compute instances create. The full syntax is described here.

2nd generation Google cloud SQL - App Engine

Delighted to see that you have rolled out 2nd generation cloud SQL in Beta. However, I see that it is not available yet to GAE projects. Can you estimate when this link will be enabled please? We are making some big infrastructural changes in our fancy system necessitated by the slowness of Generation 1 SQL, but will stick with cloud SQL if the change is not far off.
As of April 27, 2016 Second Generation connectivity to App Engine is supported.
OLD content:
The Cloud SQL team is actively working on adding App Engine support for Second Generation instances. Unfortunately I can't speak about specific dates, but we hope to make it available as soon as possible.
You can now connect to second generation Google Cloud SQL instances from App Engine apps. The connection string is slightly different from first generation instances (docs).
Open your SQL instance in the cloud console.
Under properties copy the "Instance connection name". Note that this is different to the 'name' of your instance and will probably follow the format project:region:instance.
It is normal for the UI to say "None" for authorized applications - you will still be able to connect from GAE. Note: the SQL instance and GAE app must be part of the same project.
Update: Don't have to be in the same project, you need to grant access if they are not in the same project. Ref: https://cloud.google.com/sql/docs/dev-access#gaev1-csqlv2-access
Example PHP connection code:
$con = "mysql:unix_socket=/cloudsql/CONNECTION_STRING_FROM_CONSOLE;dbname=some_db";
$this->db = new pdo($con, "root", "");
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

How to connect properly to Google Cloud SQL using Pentaho Kettle

Good day,
I have just started using Pentaho's Kettle to try and connect to a Google Cloud SQL instance. I've noticed that after making the connection, the Test on Spoon says it's working, However, despite that the connection 'connects', it cannot pull the metadata about the tables or schemas inside.
Yes, I did enable the google sql tool before hand, which, by documentation says, allows 3rd party programs to access the Google App cloud. However, as I said, it can't seem to find any tables despite being able to 'connect'.
Has anyone else encountered this?
i found the problem with the help of someone from work. He posted our findings here. :) I hope it helps. It involves actually adding in JARs to your spoon
http://lorenzo-dee.blogspot.com/2013/04/kettle-pentaho-data-integration.html

serverError:class javax.faces.el.EvaluationException could not execute query

I am getting this error from host server. I am using mysql database,tomcat and hibernate orm tool.
How can I solve this problem? Can you help me please?
I was having this problem too.
You should take a look if there's object that is not initialized, then you shoul see if the tables are specified correctly (this is more common if you develop in Windows and deploy in Linux or vice-versa).
For mote details take a look here:
Manager Bean do not returns when the project is online