Category Archives: Uncategorized

Fabric Webinar with Andrew Morgan June 19th.

MySQL Fabric – High Availability & Automated Sharding for MySQL

MySQL Fabric is built around an extensible and open source framework for managing farms of MySQL Servers. Currently two features have been implemented – High Availability (built on top of MySQL Replication) and scaling out using data sharding. These features can be used in isolation or in combination. MySQL Fabric aware connectors allow transactions and queries to be routed to the correct servers without the need for a proxy node, so operations run as quickly as ever. MySQL FabricIn this webinar you will learn what MySQL Fabric is, what it can achieve and how it is used – by DBAs, Dev-Ops and developers. You’ll also be exposed to what is happening under the covers. In addition to the presentation, there will be live on-line Q&A with the engineering team. This is a great opportunity to learn about the latest developments directly from the people building them.

WHO:
Andrew Morgan, Principal MySQL Product Manager
Mats Kindhal, Senior Principal Software Developer
WHEN:
Thu, Jun 19: 09:00 Pacific time (America)
Thu, Jun 19: 10:00 Mountain time (America)
Thu, Jun 19: 11:00 Central time (America)
Thu, Jun 19: 12:00 Eastern time (America)
Thu, Jun 19: 13:00 São Paulo time
Thu, Jun 19: 16:00 UTC
Thu, Jun 19: 17:00 Western European time
Thu, Jun 19: 18:00 Central European time
Thu, Jun 19: 19:00 Eastern European time
Thu, Jun 19: 21:30 India, Sri Lanka
Fri, Jun 20: 00:00 Singapore/Malaysia/Philippines time
Fri, Jun 20: 00:00 China time
Fri, Jun 20: 01:00 日本
Fri, Jun 20: 02:00 NSW, ACT, Victoria, Tasmania (Australia)

The presentation will be approximately 60 minutes long followed by Q&A.
WHERE:
Simply access the web seminar from the comfort of your own office.

Register

Leave a comment

Filed under MySQL Fabric, Uncategorized, Webinar

MySQL 5.7 & Fabric in Sunnyvale May 22nd

MySQL Fabric and 5.7 will be the topics of presentations this Thursday (5/22) at the Plug and Play Tech Center in Sunnyvale, California. Lee Stigile is presenting: What’s new in MySQL 5.7, and Sastry Vendantam is presenting MySQL Fabric.

Agenda is as follows:

5:00-5:30 Networking/Socialize over food and drinks
5:30-6:00 Lee will present MySQL 5.7
6:00-6:30 Sastry will present Fabric
6:30-7:00 Q&A and Socialize over food and drinks

Here is the link to register/RSVP

Plug and Play Tech Center
Thursday, May 22, 2014 from 5:00 PM to 7:00 PM (PDT)
440 N Wolfe Rd
Sunnyvale, CA 94085

1 Comment

Filed under Uncategorized

Triggers — MySQL 5.6 and 5.7

MySQL Triggers are changing in 5.7 in a big way. Triggers have been around since 5.0 and have not changed much up to 5.6 but will gain the ability to have multiple triggers on the same event. Previously you had ONE trigger maximum on a BEFORE UPDATE, for example, and now you can have multiple triggers and set their order.

So what is a trigger? Triggers run either BEFORE or AFTER an UPDATE, DELETE, or INSERT is performed. You also get access to the OLD.col_name and NEW.col_name variables for the previous value and the newer value of the column.

So how do you use a trigger? Let say you are updating the price of an inventory item in a product database with a simple UPDATE statement. But you also want to track when the price change and the old price.

The table for products.
CREATE TABLE products (id INT NOT NULL auto_increment,
price DECIMAL(5,2) NOT NULL,
PRIMARY KEY (id));

The table for price changes on the product table.
CREATE TABLE products_log (id INT NOT NULL,
price DECIMAL(5,2) NOT NULL,
change_date timestamp);

Now to define a trigger that will log price changes. We do this when a price is updated. Now the use od OLD.price to avoid confusion between the old price or the new price being saved in the log.
DELIMITER |
CREATE TRIGGER product_price_logger
BEFORE UPDATE ON products
FOR EACH row
BEGIN
INSERT INTO products_log (id, price)
VALUES (id, OLD.PRICE);
END
|
DELIMITER ;

Add in some data.
INSERT INTO products (price) VALUES (1.10),(2.24),(.99),(.01),(.34);

So UPDATE a record.
UPDATE products SET price='1.11' WHERE ID = 1;

So did it work? Yes, and no. Running SELECT * FROM products_log; Provides us with a time stamp of the change and the OLD.price. But I forgot to also record the id!! Challenge: Correct my mistake and compare it to an update I will make in a few days.

Now 5.7 introduces multiple triggers for the same event. Lets add yet another log this time recording who made the change;

The ‘who made the change table’.
CREATE table who_changed (
id INT NOT NULL,
who_did_it CHAR(30) NOT NULL,
when_did_it TIMESTAMP);

And the second trigger.
DELIMITER |
CREATE TRIGGER product_price_whom
BEFORE UPDATE ON products
FOR EACH ROW
FOLLOWS product_price_logger
BEGIN
INSERT INTO who_changed (id, who_did_it)
VALUES (OLD.id, user());
END
|
DELIMITER ;

So UPDATE products SET price='19.99' WHERE id=4; is run and we see that both triggers execute. Note that SHOW TRIGGERS from schema; does not provide any information on trigger order. But you can find all that as action_order in PERFORMANCE_SCHEMA.TRIGGERS

Being able to order triggers makes it easy to make logical steps when processing data. Can you get into trouble with this? I am certain someone will manage to make a mess with this. But I think most of us will enjoy being able to use this great new functionality.

4 Comments

Filed under Basics, DBA Tools, MySQL, MySQL Certification, Uncategorized

Colorado MySQL Meetup Group November 11th

The Colorado MySQL meetup is getting together on November 11th.

Location: Oracle 500 Eldorado Boulevard, Broomfield, CO

All MySQL users and interested parties are invited to participate and attend the following activities! 

Monday, November 11, 2013

From 6:00PM to 8:30PM

Leave a comment

Filed under Uncategorized, User Group

Studying for the New MySQL 5.6 DBA Exam

I have have been receiving a lot of questions about the new MySQL 5.6 DBA exam. Sadly I can not answer a lot of the questions until after my exam in early November. However I do know some good things about the new exams.

First — No True or False questions. Oracle has set the standards on that policy and I had to update the ol’ 5.0 exams to make certain there the T/F questions were removed. Why is this important? Don’t you have a fifty/fifty chance on T/F questions? The trouble is that some of these questions were a wee bit tricky and needed parsing plus a full understanding of the subject to get them right. For fairness, it is easy to do without the T/F questions.

Second — No more pick up to N answers. Once again, for fairness.

Third — One exam for the certification. In the past the costs, not just financial, of setting up the second exam and studying for it turned off many candidates.

So what am I studying? MySQL 5.6 Database Administrator is a list of the items on the exam.

Under Architecture, that page lists the following

    MySQL Architecture

  • Use MySQL client programs to interface with the MySQL Server interactively and in batch
  • Describe how MySQL uses disk and memory resources
  • List and describe key characteristics of standard MySQL storage engines including InnoDB, NDB, MyISAM, MEMORY, FEDERATED

Let’s take the first bullet point. How does one find the MySQL client programs? The are listed in the MySQL Manaual at http://dev.mysql.com/doc/refman/5.6/en/programs-client.html. So spend some time with mysql, mysqladmin, mysqlcheck, mysqldump, mysqlshow, mysqlimport, and mysqlslap. Read the man pages AND use the commands.

So one bullet point down, 21 to go!

2 Comments

Filed under Uncategorized

Zendcon

Zendcon is a difficult conference if you work in an exhibit hall booth. At other shows, attendees ask general questions about MySql or how Oracle is guiding products. Zendcon is much more pointed. When is 5.7 multisource relication going to be available? How does Visual Explain work? How can I make sure replication goes back to semi-sync after going async? It is a great show but the level of questions are a notch or two higher than most other shows.

20131009-115828.jpg

Leave a comment

Filed under MySQL, Uncategorized

Deep Dive Technical Buffet on last day of MySql Connect

Proving this it is the show for in-depth technical information, MySql Connect finished with a bang. Six different two hour plus deep dive tutorials were offered and all had very good attendence. Many of the attendee were seasoned Oracle DBAs eager to gorge at this buffet of technical knowledge.

The crowd for Ligaya Trumele’s Getting Started
with MySql
was packed with
Oracle DBAs who were amazed at the simplicity of the MySql architecture once they figured out the concept of multiple storage engines.

Luis Soares had a tutorial that was everything you ever wanted to know about 5.6 replication plus a look multi source that will be in 5.7. His discussion on how and when binlogs are written and the impact if that timing on replication was intense, detailed, and worth the price of the show itself.

Finishing a mentally overload day, I listened to Bernd Ocklin on MySql Cluster 7.3 and this product has really changed in the past few years. I highly recommend that you grab his slide deck on how Cluster partitions data.

Leave a comment

Filed under Uncategorized

MySQL Community Team at PHPTek, Drupalcon, Texas Linux Fest, SELF, Redhat Summit, and Lonestar PHP

This is the start of the heavy travel season for the MySQL Community Team. So if you are attending PHPTek, Drupalcon, Texas LinuxFest, SELF, Redhat Summit, or Lonestar PHP please make sure to say ‘hi’ while you are in Chicago, Portland, Austin, Charlotte, Boston, or Addison. This group of trips is starting with a swag bag full of MySQL stickers, thumb drives, and ‘boogie bots’

MySQL Boogie Bots

    Talks

  • PHPTek – Ten Things to Make Your MySQL Servers Faster and Happier — May 16th, 2:45p – 3:45p
  • Texas Linuxfest – The Proper Care and Feeding of a MySQL Database for Linux Administrators — May 31st, 11:25a – 12:20p
  • SELF – Two full days of MySQL talks but I am talking on Ten Things to Make Your MySQL Servers Faster and Happier. MySQL 101, MySQL User Administration — June 8th – 9th
  • Redhat Summit – Big & Traditional Databases — June 12th, 4:40p – 5:50p</li?

2 Comments

Filed under Uncategorized

Keeping your Drupal from Drooping — part 1

This is the first screen after a sucessful Drupal 7.22 install.

This is the first screen after a sucessful Drupal 7.22 install.

Drupal is a content management system that runs at least 2.1% of all websites(1). It is easy to use, extensable with over 20,000 add-ons, and runs beautifully with a LAMP stack.

At the heart of most Drupal sites is a MySQL database with, as of Version 7.22, 76 tables. Recently I was asked what needs to be done to a ‘generic’ Drupal to get it running on MySQL 5.6. It is a very easy update that provides better performance, security, and allows access to the newest MySQL 5.6 updates.

For this example, the generic box is a two CPU Dell x86_64 box running Centos 6.4. This is fairly typical of what a low-end hosted system from one of the many web hosting businesses a small busines might rent. Centos 6.4 was installed.

Now to use Yum to get the with the default versions of Apache, PHP, and MySQL. Sadly the MySQL provided is 5.1.69 not 5.6 (out for a month or so) or even 5.5 (two years since GA status). We will upgrade MySQL later.

yum -y install mysql-server httpd php php-mysql wget

chkconfig httpd on
chkconfig mysqld on

/etc/init.d/mysqld start
/etc/init.d/httpd start

Next we need to create a database for Drupal’s use. This is how it can be down from a Linux shell for those shy on using the MySQL client program.

echo 'CREATE DATABASE drupal;' | mysql
echo "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'drupal';" | mysql
echo "FLUSH PRIVILEGES;" | mysql

Now to get Drupal installed. Make sure your Apache DocRoot is where you install the software.

cd /var/www/html/
wget http://ftp.drupal.org/files/projects/drupal-7.22.tar.gz
tar -xzf drupal-7.22.tar.gz --strip-components=1
rm drupal-7.22.tar.gz
chown -R apache.apache .

cp ./sites/default/default.settings.php ./sites/default/settings.php

Now Drupal can be configured using a web browser. Be sure to plug in your infromation from the GRANT ALL PRIVILEGES ON drupal.* TO ‘drupal’@’localhost’ IDENTIFIED BY ‘drupal'; step for you database name, user and password. You should see something similar to the graphic at the top of this post.

So now we have a fairly generic Drupal installation that is ready to upgraded to MySQL 5.6 and next time the upgrade steps will be detailed as well as some upgrade methodologies that need to be considered.

  1. See http://trends.builtwith.com/cms/Drupal

2 Comments

Filed under Drupal, MySQL, Uncategorized

MySQL 5.6 Windows MSI Installer

First conference of the year is always a bit of a thrash for me. This time I have and RMOUG Training Days back to back. So I went to upgrade MySQL on my presentation laptop and got a pleasant surprise.

The MySQL 5.6 upgrade included not only the server but connectors and workbench

The MySQL 5.6 upgrade included not only the server but connectors and workbench

I had planned to install 5.6, the connectors, the docs, and Workbench separately as I packed. Low and behold. the upgrade did all the work for me. Very cool!

Except the packing. That I still got to do! See you in Miami and Denver.

Leave a comment

Filed under MySQL, Uncategorized