Archive for the ‘article’ Category

Setting up Google Cloud SQL

Апрель 19th, 2012

You can activate Google Cloud SQL from the Google APIs Console at https://code.google.com/apis/console. NOTE: At the time of this publication this was in limited beta.

From the Google APIs console, you can create a new instance. You can then use the Web interface to run SQL statements, import and export data. There is also a Google SQL command line client that can be configured with:

# Java 6 is a dependency of the Google SQL client
$ [ -z `which java 2>/dev/null` ] && sudo apt-get install -y openjdk-6-jre-headless
$ [ -z `which unzip 2>/dev/null` ] && sudo apt-get install -y unzip
$ cd $HOME
$ mkdir cloud-sql
$ cd cloud-sql/
$ wget http://dl.google.com/cloudsql/tools/google_sql_tool.zip
$ unzip ../google_sql_tool.zip
$ ./google_sql.sh 
Please authorize Google SQL Service for your Google Account at:

http://goo.gl/XXXX

Enter Authorization Code: *************************
sql> show schemas;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.10 sec)

NOTE: The *first time* you access your instance you need to confirm authorization by going to the provided URL.


PlanetMySQL Voting: Vote UP / Vote DOWN

Setting up AWS RDS

Апрель 18th, 2012

Amazon Web Services (AWS) provides a managed MySQL solution via Relational Database Service (RDS). The following instructions will enable you to configure and run RDS. Refer to Using Amazon Web Services for initial information about AWS requirements.

The following instructions are for Ubuntu.

Pre-requisites

$ [ -z `which java 2>/dev/null` ] && sudo apt-get install -y openjdk-6-jre-headless
$ [ -z `which unzip 2>/dev/null` ] && sudo apt-get install -y unzip

Installation

# See http://docs.amazonwebservices.com/AmazonRDS/latest/CommandLineReference/Welcome.html?r=8890
$ cd $HOME
$ mkdir -p aws
$ cd aws
$ wget http://s3.amazonaws.com/rds-downloads/RDSCli.zip
$ unzip RDSCli.zip
$ ln -s RDSCli-*/ rds

Configuration

You need to create the $HOME/aws/credentials file with your specific account details.

AWSAccessKeyId=XXXXXXXXXXXXXXXXX
AWSSecretKey=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

The following should be added to a given startup profile

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre
export AWS_RDS_HOME=$HOME/aws/rds
export PATH=$AWS_RDS_HOME/bin:$PATH
export AWS_CREDENTIAL_FILE=$HOME/aws/credentials

Verification

$ rds-describe-db-instances
$ rds-describe-db-parameter-groups
DBPARAMETERGROUP  default.mysql5.5  mysql5.5  Default parameter group for mysql5.5

It is not possible to change the default parameter group so you need to create a copy for any future configuration modifications.

$ rds-create-db-parameter-group running-mysql55 -d 'Running MySQL 5.5' -f mysql5.5

Creating a new instance

$ rds-create-db-instance book2 --db-instance-class db.m1.large --allocated-storage 20 --engine mysql --master-username dba --master-user-password passwd --db-parameter-group-name running-mysql55
DBINSTANCE  book2  db.m1.large  mysql  20  dba  creating  1  ****  n  5.5.20  general-public-license
      SECGROUP  default  active
      PARAMGRP  running-mysql55  in-sync
$  rds-describe-db-instances
DBINSTANCE  book2  db.m1.large  mysql  20  dba  creating  us-east-1a  1  ****  n  5.5.20  general-public-license
      SECGROUP  default  active
      PARAMGRP  running-mysql55  in-sync

It can take some time (e.g. 5-10 minutes for your instance to be available. When ready it will show available. In this case, the instance host is defined, however the instance is not yet accessible.

$ rds-describe-db-instances
DBINSTANCE  book2  2012-04-18T15:09:08.420Z  db.m1.large  mysql  20  dba  backing-up  book2.cqmcgpjfkies.us-east-1.rds.amazonaws.com  3306  us-east-1a  1  n  5.5.20  general-public-license
      SECGROUP  default  active
      PARAMGRP  running-mysql55  in-sync

While waiting, you can create the necessary permissions to access the RDS instance.

$ rds-describe-db-security-groups
SECGROUP  default  default
$ rds-authorize-db-security-group-ingress default --cidr-ip 10.194.163.1/21
SECGROUP  default  default
      IP-RANGE  10.194.163.1/21  authorizing
$ rds-describe-db-security-groups
SECGROUP  default  default
      IP-RANGE  10.194.163.1/21  authorized
$ rds-describe-db-instances
DBINSTANCE  book2  2012-04-18T15:09:08.420Z  db.m1.large  mysql  20  dba  available  book2.cqmcgpjfkies.us-east-1.rds.amazonaws.com  3306  us-east-1a  1  n  5.5.20  general-public-license
      SECGROUP  default  active
      PARAMGRP  running-mysql55  in-sync

Confirmation of running MySQL Instance.

$ mysql -udba -ppasswd -hbook2.cqmcgpjfkies.us-east-1.rds.amazonaws.com -e "SELECT VERSION()"
+------------+
| VERSION()  |
+------------+
| 5.5.20-log |
+------------+

Terminating

$ rds-delete-db-instance book2 --skip-final-snapshot
    Once you begin deleting this database, it will no longer be able to accept
    connections.
    Are you sure you want to delete this database? [Ny]y
DBINSTANCE  book2  2012-04-18T14:58:54.251Z  db.m1.large  mysql  20  dba  deleting  book2.cqmcgpjfkies.us-east-1.rds.amazonaws.com  3306  us-east-1a  1  n  5.5.20  general-public-license
      SECGROUP  default  active
      PARAMGRP  default.mysql5.5  in-sync

PlanetMySQL Voting: Vote UP / Vote DOWN

What have I been up to lately?

Сентябрь 2nd, 2011

Despite my best intentions, I haven't posted on this blog for a while, which is a shame! I've become busy writing on so many other places since I moved into my new role in the Oracle Linux product management team in April. I've learned a lot and I am feeling quite at home here! The team is excellent and very nice to work with — I am slowly getting the "Big Picture".

But even though I've been neglecting this blog, there are a lot of things that are publicly visible and document some of my activites:

I've created two podcasts for the Oracle Linux podcasts: In addition to working the @ORCL_Linux Twitter account and FaceBook page, I've been blogging on the Oracle Linux blog: From time to time, I'm a guest blogger on the OTN Garage blog: I also created new content and updated pages on the main Oracle web site and the Oracle Technology Network (OTN): I've been traveling a bit as well and attended a few conferences where I spoke about Oracle Linux (and MySQL): I probably forgot a few things in my reflection of the past few months, but these were some of the highlights.

Check out my followup blog post on what I'm up to in the coming weeks and months!


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL tools article

Август 1st, 2011

Although I no longer maintain hackmysql.com, I still actively develop MySQL tools. An article I wrote, 10 essential MySQL tools for admin, was published today. I hope no one’s feelings are hurt if their tool isn’t in the list, but it was rather difficult to compile the list given that so many tools are either not actively developed, not tested, or not well documented. Given lag time between writing and publishing, I was not able to write about Yoshinori’s MHA or newer tools. And given length constraints, I was not able to write about more tools. In any case, the world of MySQL tools is alive and well.


PlanetMySQL Voting: Vote UP / Vote DOWN

Some friendly advice for bootstrapping your OSS project

Октябрь 29th, 2009

So you're a small startup company, ready to go live with your product, which you intend to distribute under an Open Source License. Congratulations, you made a wise decision! Your developers have been hacking away frantically, getting the code in good shape for the initial launch. Now it's time to look into what else needs to be built and setup, so you're ready to welcome the first members of your new community and to ensure they are coming back!

Keep the following saying in mind, which especially holds true in the Open Source world: "You never get a second chance to make a first impression!". While the most important thing is of course to have a compelling and useful product, this blog post is an attempt to highlight some other aspects about community building and providing the adequate infrastructure. This insight is based on my own experiences and my observations from talking with many people involved in OSS startups and projects.


Continue reading "Some friendly advice for bootstrapping your OSS project"
PlanetMySQL Voting: Vote UP / Vote DOWN

Jeremy’s article on MySQL Sandbox in Linux Magazine

Сентябрь 24th, 2009

Jeremy Zawodny and MySQL Sandbox

Jeremy Zawodny of Craiglist has written a kind article about MySQL Sandbox.
The article, MySQL Sandbox: Treat MySQL Instances like Virtual Machines, is a practical test of MySQL Sandbox with usage examples and warm appreciation.
Thanks, Jeremy!

The article was published in July but I noticed it only today. I guess I should pay more attention to my favorite topics when I travel.

PlanetMySQL Voting: Vote UP / Vote DOWN