How to change character_set_server in Amazon's Aurora DB? - amazon-web-services

Currently using Amazon's Aurora DB and in our Jira we are seeing some names with question marks (???) due to their characters.
After further looking into this it seems that I need to change the character_set_server from latin1 to utf8.
In Aurora DB I looked in the parameter groups and cluster group settings but I don't see character_set_server, or anything similar.
Thank you.

As Mark B said, you can easily change it on "Parameter groups" page,
Open your cluster group settings for edit and enter "character_set_ser" in the filter and you should see it.
For more information read the following page:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html
https://aws.amazon.com/premiumsupport/knowledge-center/rds-modify-parameter-group-values/

Related

Replicating data from SQL Server to BigQuery

I've been trying to follow instructions from Google on Replicating data from SQL Server to BigQuery available here: https://cloud.google.com/data-fusion/docs/tutorials/replicating-data/sqlserver-to-bigquery. Following instructions to the letter step by step always results in this odd error when creating the Cloud Fusion instance
Invalid argument (HTTP 400): retry budget exhausted (3 attempts): cloud-control2-saas::GCE_BAD_REQUEST: Invalid value for field 'networkPeering.name': '*******'. Must be a match of regex '(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)'.
**** is the project ID with the VPC network suffix after a dash and it looks a bit like this (I've changed values)
website.com:api-project-0000000000-default
This value is being assigned somewhere by Google, I am not given a choice to select this or enter this through the instructions when creating the Instance.
Googling the error doesn't show me anything useful and sadly I do not have budget to acquire GCP support in this instance to try and ask them why their instruction appear not to work.
I've already checked quotas, billing, service account permissions, etc. I've also tried both a new VPC as well as a shared VPC with all the settings from the guide.
Would appreciate someone more experienced in this area maybe point me in the right direction or if someone has some sort of understanding of where else to check what could be wrong I would appreciate it.
Instructions do point at creating a peering connection but the instructions themselves require the Cloud Data Fusion Instance to be created before configuring the peering connection and since I can't create the Cloud Data Fusion Instance I am unsure on what exactly I am supposed to do.
Appreciate the help!
According to this documentation, before creating a private instance I assume you're creating a VPC network.
networkPeering.name is a combination of your Project-id and VPC-network. The error which you're getting is due to incorrect naming convention of networkPeeering name. ie. the value of networkPeering.name does not match the regex expression (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?), which in your case is due to the project-ID: website.com:api-project-xxxxxxxxx.
Also note that networkPeering name should be less than 63 characters in length as per the regex expression.

How can I restore from a snapshot on AWS RDS-Preview?

This is RDS-Preview in Ohio, on a Postgres database.
My database randomly shut itself off. It was serving a read-only web app, there was no write traffic. This is already frustrating. I have two snapshots, one marked as "automated" and one as "manual". I attempt to export either to S3, but this option is greyed out. I attempt to restore the database. The drop downs for "DB Engine" and "license" both only allow one option, postgres (as expected). I pick the same instance class that it was (db.t2.micro), but I just get this:
RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.t2.micro, Engine=postgres, EngineVersion=12.20191002, LicenseModel=postgresql-license. For supported combinations of instance class and database engine version, see the documentation. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 8cfc0826-9664-40d1-99f6-3f40977f5aec)
I try a random selection of database instance classes, none of them allow me to restore the snapshot. If anyone could point me towards this "documentation" that describes which instance class I'm permitted to use to restore my database snapshot which is apparently Postgres 12.20191002, I believe that would solve the problem. I can find this documentation for RDS, but not RDS Preview. RDS doesn't even have Postgres 12 yet.
How can I get this data back? I just want access to the snapshot, by any means. :(

AWS Aurora Serverless RdsDataClient unicode problem

I'm using latest AWSRDSData client for running queries on my Aurora-MySQL database.
The schema and table charsets are utf8mb4 and collation is utf8mb4_turkish_ci;
When I insert rows via MySQL workbench, there's no problem with unicode characters but when using RDS Java SDK, unicode characters such as \u015F appear as ?.
I couldn't figure out how to set charset of data client by scanning sdk methods, help is appreciated.
thanks in advance
The problem is solved thanks to AWS support team.
Here is the point: even though the charset and collation are set on SQL Engine, the following parameters should be set in RDS DB parameter groups, in order to let rds data client understand the charset and collation for connection.
collation_server
collation_connection
character_set_server
information about parameter groups: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.parameter-groups

How can I set the value of log_line_prefix while creating postgres rds

I am creating a postgres database in aws cloud through CFT. I want to set log_line_prefix value in the postgres.conf file.I am unable to set the values by adding it to db parameter group.Is there any other way to set this?
log_line_prefix isn't supported in RDS, Here is the workaround mentioned in the official documentation.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Badger
You can use a log analyzer such as pgbadger to analyze PostgreSQL logs. The pgbadger documentation states that the %l pattern (log line for session/process) should be a part of the prefix. However, if you provide the current rds log_line_prefix as a parameter to pgbadger it should still produce a report.

Are "Database URL" and "Database Instance" the same id?

While following this tutorial for deploying a simple Flask app to AWS RDS and ElasticBeanstalk, I am running into the error
sqlalchemy.exc.OperationalError: (OperationalError)
(2003, 'Can\'t connect to MySQL server on
\'flasktest.kedfifydb8esbdk.us-east-1.rds.amazonaws.com\'
((1049, u"Unknown database \'flaskdemo\'"))') None None
at python db_create.py.
In the statement
SQLALCHEMY_DATABASE_URI = ‘mysql+pymysql://<db_user>:<db_password>#<endpoint>/<db_url>’
what is <db_url>? Is it not precisely the name chosen for DB Instance at the RDS management console?
If, as I expect, that's the case, what else might I be missing?
Update soliciting comments
The entire process is ultimately frustrating. "Push this button", "click here", then do this and that, are all far too error prone and do not appeal to programmers. I'm now looking for a way to script all the deployment steps. And then the process becomes reproducible and reliable. That said, the experience of getting it right once from the GUI helps to identify a minimal working setup. A sequel exercise is to convert this tutorial to a script. Comments welcome.
I believe it would be the name of your DB within the instance, or specifically, the DB Name attribute. The name of the DB instance is the name of the RDS instance itself, and not the actual database that the RDS instance is hosting.
Let me know if you can find it...it should be under Created Time and above Username. If not, I can see if I can include a screen of one of my RDS instances.
I had the same error. Make sure you are correctly writing down the parameters in the URI string. Looks like the flash demo database does not exist!.
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://yourusername:dbpassword#endpointhere/dbname'
The 'DB Name' parameter listed under the Summary in the Database console IS NOT your dbname in the URI string!. The worst case creates another database and writes down your parameters. You should get the DB name in the 'Database options' while creating the database.
Also, make sure that your database is using a correct security group. The 'default' security group should be removed from the database and your new security group must allow access to your database.
Security - Security Groups
Security Group Here