Showing entries 9373 to 9382 of 44047
« 10 Newer Entries | 10 Older Entries »
Turning 38 today; Going Static

I am turning 38 years old today. I am on my way to Belgium for the funeral of my grandmother. My family, Marta and Tomas, are at home.

I am in Bielefeld, on top of the hill. This is our usual stop from Berlin to Belgium: it’s practically in the middle.

I am sitting at the bar, and I have just finished a great project I have been working for a few months: revamp my homepage and blog, once again.

I tried a few things getting away from (the great) Wordpress. I was trying to make my own again, doing it with Django or Flask, I am a Python guy after all. I tried to do something with my OwnCloud setup, with files, but that was so 1990s, writing HTML.

Giving up, I did a search for “generate static website” and I pretty much hit the first link: “Jekyll”. It is written in Ruby, so I am …

[Read more]
#DBHangOps 06/11/15 -- DBA Expectations and Automation

#DBHangOps 06/11/15 -- DBA Expectations and Automation

Hello everybody!

Join in #DBHangOps this Thursday, June, 11, 2015 at 11:00am pacific (18:00 GMT), to participate in the discussion about:

  • What does being a DBA mean to you?

    • What are your expectations of a DBA?
  • What's the last thing you automated and why?

You can check out the event page at https://plus.google.com/events/ctmk6ua93affd01jnfmm73i68fo on Thursday to participate.

As always, you can still watch the #DBHangOps twitter search, the @DBHangOps twitter feed, or this blog post to get a link for the google …

[Read more]
Hash-based workarounds for MySQL unique constraint limitations

In the past I have written about MySQL's limitations that prevent you from creating an index over a certain length, or with more than a certain number of columns. I've offered some solutions for those problems, but many of my solutions hit another limit further down the line. For example innodb_large_prefix allows you to create an index on larger columns, but only up to 3072 bytes, and my workarounds for the 16 column limit per index will also hit that 3072 byte limit once you add lots of columns or add some very long columns.

Today I'm going to suggest a …

[Read more]
Replicate MySQL to Amazon Redshift with Tungsten: The good, the bad & the ugly

Heterogenous replication involves moving data from one database platform to another. This is a complicated endevour because datatypes, date & time formats, and a whole lot more tend to differ across platforms. In fact it’s so complex many enterprises simply employ a commercial solution to take away the drudgery. Join 31,000 others and follow Sean … Continue reading Replicate MySQL to Amazon Redshift with Tungsten: The good, the bad & the ugly →

Indexing MySQL JSON Data

“MySQL’s JSON data type is great! But how do you index the JSON data?” I was recently presenting at the CakePHP Cakefest Conference and was asked that very question. And I had to admit I had not been able to play, er, experiment with the JSON datatype to that level. Now I have and it is fairly easy.

1. Create a simple table
mysql> desc colors;
+--------------+----------+------+-----+---------+-------------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+----------+------+-----+---------+-------------------+
| popular_name | char(10) | YES | | NULL | |
| hue | json | YES | | NULL | |
+--------------+----------+------+-----+---------+-------------------+
2 rows in set (0.00 sec)

2. Add in some data
INSERT INTO `colors` VALUES ('red','{\"value\": \"f00\"}'),('green','{\"value\": …

[Read more]
Improving the Performance of MySQL on Windows

In this blog entry I’d like to describe how you might be able to improve how MySQL performs on Windows by ensuring that you take advantage of a Windows specific configuration setting.

On Unix systems, MySQL programs treat the localhost host name specially. For connections to localhost, MySQL programs attempt to connect to the local server by using a Unix socket file, which has some performance advantages over a TCP/IP connection. Windows does not support Unix sockets, however, and hence does not benefit from this optimisation.

However, the use of shared memory connections on Windows can offer significant performance improvements over the use of TCP/IP connections. Shared memory connections are obviously only useful when both the MySQL client and server processes are executing on the same machine, but when …

[Read more]
Auditing MySQL with McAfee and MongoDB

Greetings everyone! Let’s discuss a 3rd Party auditing solution to MySQL and how we can leverage MongoDB® to make sense out of all of that data.

The McAfee MySQL Audit plugin does a great job of capturing, at low level, activities within a MySQL server. It does this through some non-standard APIs which is why installing and configuring the plugin can be a bit difficult. The audit information is stored in JSON format, in a text file, by default.

There is 1 JSON object for each action that takes place within MySQL. If a user logs in, there’s an object. If that user queries a table, there’s an object. Imagine 1000 active connections from an application, each doing 2 queries per second. That’s 2000 JSON objects per second being written to the audit log. After 24 hours, that would be almost 173,000,000 audit entries!

How does one make sense of that many JSON objects? One option would be to write your own parser in …

[Read more]
Improved User Parsing From The MySQL Protocol

This isn’t really a feature we should brag about, because it’s a bug that took us a while to figure out, but we believe in sharing the bad as well as the good. There’s a lot to learn from TCP reassembly and protocol reverse engineering!

We received a request from a customer to help track down the user that was sending some queries to their database. Normally we can find this information easily: the user is one of the properties of query samples, and we can just click on a sample and see it. But for this particular customer, the user was always unknown_user.

This means we weren’t able to figure out what database user was issuing the query. Normally there are two ways we can figure out what the user is:

  1. We see the connection handshake and capture the username from there.
  2. We see a COM_CHANGE_USER packet and capture it from that (rare).

Our theory was that …

[Read more]
JSON and the MySQL Argonauts

The MySQL 5.7.7 JSON lab release has been getting a lot of attention. At a recent conference, I was cornered by a developer who wanted to jump in with both feet by running this release on his laptop on the flight home. However the developer was not sure how to begin.

1. Down load the MySQL JSON release from http://labs.mysql.com/. You will get the choice of a Linux binary or source code. Please grab the binary if you are using Linux and un-gzip/tar the download.

2. Shut down the current running version of MySQL. I was lucky in this case that the developer was using a recent copy of Ubuntu.

3. Change directory to the ~/Downloads/mysql-5.7.7-labs-json-linux-el6-x86_64 directory.

4. sudo ./bin/mysqld_safe –user=mysql&

5. ./bin/mysql -u root -p, then provde the …

[Read more]
Become a MySQL DBA blog series - Backup and Restore

It is not uncommon that developers, network/system administrators, or DevOps folks with general backgrounds, find themselves in a DBA role at some point in their career. So, what does a DBA do? In the previous post, we covered monitoring and trending practices, as well as some popular tools that you might find handy in your day to day work. 

We’ll continue this blog series with another basic but crucial DBA responsibility - taking backups of your data. Backup and restore is one of the most important aspects of database administration. If a database crashed and there was no way to recovery it, any resulting data loss might lead to devasting results to a business. One could argue that you can protect against crashes by replicating to multiple servers or data centers. But if it is an application error that propagates to all …

[Read more]
Showing entries 9373 to 9382 of 44047
« 10 Newer Entries | 10 Older Entries »