Webinar series – A step-by-step process to optimize MySQL database performance

Hope you have been following our recent webinars on MySQL, Galera Cluster, AWS monitoring and more.

We are coming up with a webinar series in association with Eric Vanier, a leading MySQL expert consultant. The series will provide a step-by-step process to optimize MySQL database performance.

This webinar series is for everyone who is looking for ways to monitor their MySQL databases, simplify the process to manually analyze queries and achieve faster issue resolution time.

Eric Vanier will focus on key problem areas that are faced by DBAs and Shree will provide a solution-driven demonstration to overcome issues while monitoring the database performance. To make it simple, the series will comprise of three parts:

Part – 1: MySQL Performance Tuning
26 June; 10:00 am Eastern time

Troubleshooting a MySQL server performance problem is often a tedious activity as it’s difficult to figure out where to start and how to cope up with it. In the case of an increase in the volume of data and load on the server, the queries tend to run slower and deadlocks become a frequent occurrence.

In this webinar, you will learn the following:

– 3 different ways to identify slow queries.
– Spot query performance pattern over a particular period.
– Proactive monitoring by setting up server/ tag specific alert.
– Fetching deadlock information.
– Monitor MySQL log files on a remote machine.
– Product comparison between Monyog and MySQL Enterprise Monitor.

Register here

Part – 2: Real-time monitoring and RDS file-based log monitoring
03 July; 10:00 am Eastern time

Many of our customers use Monyog to help monitor data in real-time and find the problematic queries. Moreover, Monyog is the only tool that provides file-based log monitoring for Amazon RDS for MySQL & Aurora on RDS.

In the 2nd part of our webinar series, you will learn the following:

– Analyze queries without slow query file.
– Monitoring queries in real-time.
– Monitor log files for RDS instances.
– Performance overhead caused by Monyog.
– Hardware requirement for Monyog.
– Monyog architecture.

Register here

Part – 3: Achieve faster issue resolution time
10 July; 10:00 am Eastern time

In this final part of the webinar series, we will focus on effective practices of monitoring MySQL databases using Monyog. This will provide as in-depth learning session for making the best of the monitoring tool.

Learn the following in this webinar:

– Using explain plan in Monyog.
– Quickly monitoring database and tables size.
– Create Monyog users with restricted access and privileges.
– Minimize the data generated by Monyog.
– Create aggregated report of the data collected in Monyog.

Register here

If you are not able to attend the webinar live, register anyway and we’ll send you a link to the recording once the webinar session has ended.

The post Webinar series – A step-by-step process to optimize MySQL database performance appeared first on Webyog Blog.

via Planet MySQL
Webinar series – A step-by-step process to optimize MySQL database performance

Wife of Hartford, CT Police Officer Destroys Anti-Gun Politician in Scathing Letter

police

We’ve all heard ridiculous claims about law enforcement, but this one really takes the cake.

State Representative Minnie Gonzalez (D-Hartford) had quite a bit to say about HB 6663, a Police Accountability Bill she is passionately supporting. Discussing the bill in front of the Connecticut Legislature’s General Assembly, Gonzalez said:

 “This bill is to hold accountable and to stop those cowboys that, because they got a bat and a gun, they think they can go shooting especially young kids in our community. This is not the Wild Wild West. And no consequences. Those cowboys doesn’t belong in the police department. This abuse has got to stop.”

While thousands of Connecticutians have spoken out against Gonzalaz’s ignorant and irresponsible remarks, but one response has gone viral. Marissa Cullen, the wife of a Hartford Police Officer, took the anti-gun liberal to task in an epic smackdown.

In an open letter, Cullen wrote:

To State Representative Minnie Gonzalez:

I am the proud wife of a Hartford Police Officer and Air Force Veteran. The men and women of the Hartford Police Department are some of the finest people I know and have more integrity than you could ever wish to have. They serve their communities with pride, dedication, and distinction. These officers put their lives on the line every single day, for little pay, little recognition, and with very little support from elected politicians. These men and women go into their neighborhoods every day truly trying to make a difference, something you know nothing about.

The comments made by you on June 5, 2017, in defense of Bill HB6663 were appalling, ignorant, and unnecessary. While you stated that you support the HPD and its officers, your statements were a direct contradiction to that. Let me address them one by one.

You stated that the officers were cowboys with guns and bats. I’m not sure I have ever seen them wear cowboy hats or boots to work. I have seen officers on horseback, however, they were not herding cattle. I have seen my husband come home with blood on his boots and tears in his eyes as he has faced some of the most horrific acts humans can do to one another. I’ve watched him on phone calls with other officers, consoling them as they attempted to come to terms with the suicide call, or child abuse case, or the senseless murders that occur all too frequently.

You stated that there are good and bad cops, you are correct. There are far more good ones than bad, which is more than I can say for politicians. The vast majority of police officers joined the force to do good, to make a change, and to be positive influences in their communities.

You stated that HPD officers have good pay, good benefits, and a good pension. What you fail to mention is that their good pay comes from countless hours of overtime, or road jobs (which are not paid for by the city, and the city actually makes money off of), you fail to mention the missed birthdays, holidays, anniversaries, and special occasions they have missed in order to protect your ignorance. From my understanding, you get paid a hefty stipend for being an elected official, receive benefits, and will receive a pension.

You stated that “you” pay for the officers’ lunch and dinner. I’m not sure how you determined that, as I send my husband with his meals daily, while he works his 16-hour shifts. He frequently comes home with his meals still in his bag, as they do not get a lunch break, and is often lucky if he can even get a bite in between calls.

You stated that these “cowboys” are killing young kids in our community with no consequences, and this abuse needs to stop. Since 2005 there have been 20 Officer Involved Shootings according to HPD data. That’s one shooting every 219 days by an officer. Considering the amount of public interaction, and the calls for service, this equates to a less than 1% chance of being shot by a police officer in Hartford. The last time a person was killed by a police officer in Hartford was in 2013, a whole 4 years ago, and it was entirely justified. Again, your ignorance is glaring, and your abuse of police officers needs to be stopped.

You stated that you pass laws frequently to protect and train police officers. The training is mandated by the State of CT, and you have done nothing to indemnify or protect officers of your community. In fact, based on your history, I am not even sure how you can remain in office. Your family has been called a “crime syndicate.” You have been found guilty of elections violations, you have the “Minnie Gonzalez Little League,” which receives over $75,000 a year in taxpayer money, and is managed by your husband. In fact, it seems as if you have a significant conflict of interest in presenting or debating any type of law enforcement bill, as taking power away from the police directly benefits you and your family.

It is very easy to sit in your safe office and make ignorant, untrue statements towards our officers. They need your support, not your condemnation. You lack integrity, honesty, and decency. You should take a ride along with a Hartford Police Officer on a Saturday night during the summer, and see what they are exposed to. Have you ever taken simulation training?  I’m sure you would not make accurate split-second decisions that you expect from our officers. You truly should be ashamed of your statements against HPD and in fact, should issue a very public apology for condemning them in the way you did.

Sincerely,

Marissa Cullen
The Wife Of A Hartford Police Officer

P.S.: Here is the link to your inaccurate, cowardly statements, to refresh your memory:

 

The post Wife of Hartford, CT Police Officer Destroys Anti-Gun Politician in Scathing Letter appeared first on Bearing Arms.

via Bearing Arms
Wife of Hartford, CT Police Officer Destroys Anti-Gun Politician in Scathing Letter

Watch: How is 22 Rimfire Ammo Made?

I really enjoyed this video, which shows us how CCI 22 rimfire ammo is made in CCI’s factory.

To begin, circles are punched out of sheet brass and cold-formed into small brass cups. Then to relieve the stress of the cold forming process, they are annealed. After a wash and dry, a drawing process reduces diameter and increases length.

The cup on the left is formed in the first step. The one on the right is ready to go into the header.

The cup on the left is formed in the first step. The one on the right is ready to go into the header.

Next comes another wash & dry before hitting the header. The header is so named because it forms the case head — the part with the rim. It also adds the head stamp, which in this case is the C for CCI.

A surprisingly non-automated step comes next, in which the brass cases are placed into plates so they can be primed.

In rimfire ammo, priming compound is placed into the inside of the case head and made to flow into the rim from the inside. Then a firing pin strike can pinch the brass rim to ignite the priming mix and thus ignite the powder charge.

After priming, the case is of course charged with powder and a bullet is seated into it. Next comes the crimp, which tightens the case mouth so that it will hold onto the bullet properly. After that, the ammo can be sorted into trays and the bullets waxed, then it’s boxed (and presumably sent to Wal-Mart where one person will buy it all and cram it into a dank corner of his basement until the world ends).

Lead billets ready to be turned into bullets.

Lead billets ready to be turned into bullets.

Next, we see how they make their bullets. The amount of lead the factory consumes in a day is tremendous, and the process of turning it into bullets is interesting. It’s molten and cast into large cylindrical six-inch-diameter 300-pound billets, which are then shoved through a press to form wire, which is then cut into slugs.

Reduced to small-diameter lead wire, the lead is then cut into slugs.

Reduced to small-diameter lead wire, the lead is then cut into slugs.

Each slug can then be formed into an actual bullet.

A slug next to a formed bullet.

A slug next to a formed bullet.

Bullets are then coated with black lead or plated with copper before being loaded into ammo.

I like it.

The post Watch: How is 22 Rimfire Ammo Made? appeared first on AllOutdoor.com.

via All Outdoor
Watch: How is 22 Rimfire Ammo Made?

A Complete Guide To Switching From HTTP To HTTPS






 



 


HTTPS is a must for every website nowadays: Users are looking for the padlock when providing their details; Chrome and Firefox explicitly mark websites that provide forms on pages without HTTPS as being non-secure; it is an SEO ranking factor; and it has a serious impact on privacy in general.

A Complete Guide To Switching From HTTP To HTTPS

Additionally, there is now more than one option to get an HTTPS certificate for free, so switching to HTTPS is only a matter of will.

The post A Complete Guide To Switching From HTTP To HTTPS appeared first on Smashing Magazine.

via Smashing Magazine
A Complete Guide To Switching From HTTP To HTTPS

Learn how to colorize black and white photos in only 4 minutes

We at DIYP have featured many fantastic colorizations of black and white images. If you’ve always wanted to try it yourself, this tutorial by Chris from Spoon Graphics  is the video you definitely need to watch.

It’s intended for beginners, and it’s simple and easy to follow even if you’ve never colorized an image before. Although this process takes a lot of time and skill, Chris makes it simple and gives you some basic guidelines for adding colors to black and white photos, which you will easily upgrade as you follow the tutorial. This video is a great way to step into the world of photo colorization, and it will make you try the technique out instantly.

VIDEO

You can play with some old family photos or use old photos from the Internet. Chris chose a sepia image of his granddad from WW2 to demonstrate the technique.

1. Cleaning the image

When you open the image in Photoshop, convert it to Smart Object and start by removing the scratches and dust. You can go to Filter > Noise > Dust and scratches, and set the radius to 1-2 pixels and threshold to 20-30 levels. If there are still some scratches and specks of dust left, you can clone them out manually.

2. Adjusting the image tones and contrast

If you’re working with a sepia image, add a Black & White adjustment layer to neutralize the tones. Then add Levels adjustment layer to fix the contrast, and keep in mind you’ll probably need to darken the shadows quite a lot.

3. Converting the image to CMYK

When you’re satisfied with the image, Chris suggests converting it to CMYK (Image > Mode > CMYK Color). This makes the original tones of the image show less if the photo is sepia, and colorizes the darker areas much better.

4. Adding color

After the first three steps, your image is ready for colorization.

Start by adding a new Solid Color adjustment layer in the approximate hue of the area you’re working on. For example, choose the color of the skin. Set the blending mode to Soft Light, and you’ll notice your entire photo is toned with this color. Alternatively, you can choose a blending mode that will add more vibrancy to the selected hue and adjust the opacity if needed.

Next, select the layer mask next to the Solid Color adjustment layer and fill it with black to clear the color overlay.

Now switch to the Brush Tool and adjust the hardness and size, depending on the area you’re working on. Choose the white color for the brush and start painting over the areas where you want the color to reveal. In this case, the skin. Switch the brush to black to remove the color from unwanted areas or clear any mistakes. From this point, you can change the color of the Solid Color adjustment layer, as it’s easier to manage the hue when you see it in the image. You can also adjust the opacity of the layer to tone it down, if necessary.

When you’re done with the skin, apply the same principle to all the other areas: lips, clothes, background, jewelry and so on.

Keep in mind that adding some color in the specific areas makes the colorization look more realistic. For example, some pink around the eyes, blue around the unshaved beard, yellowish tones on the skin and so on. All these should be made practically invisible, with opacity under 20%, but they’ll add some nice color variation to the image.

When you add color to the photo, have in mind that a pen tablet makes the process much easier and more precise. But it’s still possible to do it with the mouse, and you can use a Pen Tool to make selections before applying color.

Once you’ve finished with adding color to all the areas, there are some final tweaks to improve the image further. Add a Color/Saturation adjustment layer on top of the layer stack, to add some vibrancy to the image. You can also add a Color Balance adjustment layer to correct the overall tone of the image.

Here is how it turned out for Chris:

Personally, this tutorial got me so interested, that I sat down and tried colorizing a photo, for the first time in my life. I wasn’t too precise and devoted, but I just wanted to try out the technique – and I’m still pretty satisfied with the result. So here’s my first colorized black and white photo ever:

I love colorized images and love to see when someone brings the old photos back to life this way. I found this tutorial helpful as someone who’s never added color to black and white photos before, and I hope you did too. If you decide to try it out, don’t be shy – share your results with us.

[How To Colorize a Black and White Photo in Photoshop via FStoppers]

via DIYPhotography.net – Photography and Studio Lighting – Do It Yourself
Learn how to colorize black and white photos in only 4 minutes

This Chrome Extension Makes Gmail Insanely Productive

Advertisement

If you are looking for an easier way to connect your emails or your to-dos to your calendar, then look no further than Handle for Gmail. This extension for Google Chrome will boost your productivity with tools that are completely linked. You can save time


How to Use Google’s Productivity Tools to Maximize Your Time




How to Use Google’s Productivity Tools to Maximize Your Time

Google Keep, Google Calendar, and Gmail are productivity tools that can help you manage your time. We demonstrate how you can use Google’s free tools to optimize your workday.
Read More

, get things done, and never forget an important event with one handy add-on.

Handle To-Dos

Turn Emails Into Tasks

One of the best features of Handle is the ability to turn your emails into to-dos. When using Gmail in Chrome, select the email and either hit the T key or click the Handle button and then the large plus sign.

First, Handle will pop open in the sidebar view. Second, the email subject line will display as a new to-do title. And third, the email will be automatically attached to your task.

If you have Handle in full-screen view, just click the large plus sign to transform the email into a to-do.

You can then make changes to the name, add a reminder, set a due date, include a note, and move the task to an existing or new project. When you finish your edits, just click Save.

Add New Tasks

From the main menu on the sidebar or full-screen view of Handle, you can create a brand new task quickly. Either select New To-Do under the To-Dos list or click the small plus icon from the top.

You can then add the task name along with the same items as above for dates and notes. To create a smart to-do, you can include words such as today, tomorrow or next Monday in the task name. This will set a reminder automatically.

handle for gmail create task

If you do choose to set up a reminder, an option to make the to-do repeat will appear. Then pick your preference from every day, week day, week, month, or year. Note that if your task has a due date, it cannot repeat. The repeat feature works only with the reminder feature.

Set Up Projects

Another terrific highlight of Handle is its project feature. To get started, select New Project from the Projects list from the main menu on the sidebar or full-screen view. You can create multiple projects that include tasks within each.

With simple settings, you can name your project, assign it a color, give it a due date, and create a reminder.

handle for gmail create project

If you need to edit an existing project, select the name of the project in either view and click Settings.

Use Location-Based Reminders

If you are toting around your Chromebook


Get Creative While Offline With These 8 Amazing Chrome Apps




Get Creative While Offline With These 8 Amazing Chrome Apps

Keep your creativity flowing where you’re on-the-go with these incredible offline apps for Google Chrome.
Read More

or use Handle on a mobile device, then you can take advantage of location-based reminders. To set up places like home, work, or school, select New Location from the Locations list.

You also have this option when you create a task reminder. Click Where at the top and then New Location.

handle for gmail where

You can then either enable your location for it to automatically display or enter an address into the search box. Give it a name and click Save. Then, when you want to use a location-based reminder, this new place will show up in your list of options.

handle for gmail create location

To edit or delete an existing location, select its name and then click Settings for your options.

Work With the Calendar

Connect Calendars

Handle connects to your current calendars easily. When you create an account, you will be prompted to select the calendars that you want to see. If you need to edit this, you can do so from your Settings at any time.

handle for gmail calendars

In Chrome, click the Handle button and then enter full-screen view. On the menu on the left, click your name and under Calendar Options, select Calendars to make your adjustments.

On your mobile device, select Settings from your left-hand menu to access the options.

Create Events

While the mobile app has a convenient tab for the calendar, when you are using Gmail in Chrome, your Handle calendar will display any time you are in full-screen mode. From there, you can view your events by day, week, or month.

handle for gmail create event

To add an event, click the correct date and start time within any calendar view and a pop-up box will display. Then, just enter the event name, select the related calendar if you have connected more than one, and optionally enter a location or note. When you finish, click Save.

handle for gmail gif

To adjust the time of an event on your calendar, simply drag the end time to make it longer or shorter. Or if the time has completely changed, you can move the entire event by dragging it.

Connect To-Dos With the Calendar

You can also turn tasks into calendar events or add the due date and time to a task by using the calendar. In full-screen view, just drag the to-do from the left to where you want it on the calendar and that’s it.

The task will then show up on your calendar, contain the date and time, and still display in your list of to-dos.

handle for gmail gif

Mobile Sync

You can currently use Handle on your iOS mobile device for free or jump onto the waiting list for Android by visiting the Handle website.

If you enjoy Handle for Gmail on Chrome, then syncing with your mobile device is a great way to stay updated no matter where you go. The iOS app offers a few additional features that you will find useful:

Are Your Ready to Handle Your Gmail Better?

Handle for Gmail might be just the Chrome extension you need to keep your work flowing


25 Chrome Extensions to Make You More Productive




25 Chrome Extensions to Make You More Productive

We hear so much about productivity. How do we become more productive? What can help us be extra productive? Which tools make us the most productive?
Read More

. Why stop what you are doing to create a task or appointment after receiving an email? Try Handle for Gmail and turn that message into a to-do or event quickly and easily. And don’t forget to use Handle’s helpful project feature for organizing it all.

If you use Handle for Gmail and have some helpful tips you would like to share, please leave us a comment below!

via MakeUseOf.com
This Chrome Extension Makes Gmail Insanely Productive

CalDigit Thunderbolt Station 3 dock with eSATA, dual-4K display support starts shipping

 

CalDigit Thunderbolt Station 3 dock with eSATA, dual-4K display support starts shipping

CalDigit has commenced shipments of the Thunderbolt Station 3 dock, an accessory for Macbook Pro users wanting to expand their notebook’s connectivity options first launched in CES, with the $249.99 device offering dual 4K display support and a pair of eSATA ports alongside more conventional connections.

Introduced as a Thunderbolt 3 dock for professionals in January, the Thunderbolt Station 3 borrows some of the appearance of its predecessor, the Thunderbolt Station 2, but upgrades the Thunderbolt connectivity to a pair of Thunderbolt 3 ports. Able to offer 40Gb/s of bandwidth, these ports are also capable of recharging a connected MacBook Pro, providing up to 85W of power, and can also be used to daisy-chain up to six devices through a single Thunderbolt 3 port on a MacBook Pro.

On the front of the unit are audio connection ports, as well as a USB 3.0 Type A connection with standalone charging, while on the back are the Thunderbolt 3 ports, two USB 3.0 connections, Gigabit Ethernet, and one DisplayPort. The Thunderbolt 3 ports and the DisplayPort can be used to support two 4K monitors, with it also capable of powering a 5K-resolution display.

Added to the connections list are two 6 gbit/sec eSATA ports, allowing for external storage devices to connect to the dock and be used by the MacBook Pro. While users will probably want to use the spare Thunderbolt 3 connection to attach external storage to the dock, to take advantage of the higher bandwidth, the inclusion of eSATA at least means older storage hardware can still be used, making it an option for accessing archive drives.

CalDigit is shipping pre-orders of the Thunderbolt Station 3 now, with new orders expected to ship at the end of June. The dock is priced at $299.99.

The new release follows after another dock launched at the same time as the Thunderbolt Station 3, earlier this year. The Thunderbolt Station 3 Lite is a thinner unit at AppleInsider previously examined, with a slightly smaller number of connections and limited charging power, but is positioned as a value option at $199.99.

via AppleInsider
CalDigit Thunderbolt Station 3 dock with eSATA, dual-4K display support starts shipping

Stunning Timelapse of Rolling Clouds Looks Like Someone Flipped the Ocean Upside Down

GIF
GIF: Vimeo

He’s been chasing storms for eight years, but filmmaker Mike Olbinski called this event—a sunset that blasted a rare display of rolling undulatus asperatus clouds with an amazing lightshow of colors—“one of the most incredible scenes [he’s] witnessed.” The resulting 4K timelapse is one you’re going to want to watch in fullscreen.

GIF
GIF: Vimeo

Were you to lay on your back and watch these clouds—captured in land-locked North Dakota—upside down (or just flip the footage) you’d be hard pressed to distinguish them from the swelling waves of the ocean during a storm. We recommend firing up the biggest monitor you can find, putting on some trippy music, and letting the cloud-waves roll over you.

[Vimeo]

via Gizmodo
Stunning Timelapse of Rolling Clouds Looks Like Someone Flipped the Ocean Upside Down

MySQL Encryption at Rest – Part 1 (LUKS)

MySQL Encryption at Rest

MySQL Encryption at RestIn this first of a series of blog posts, we’ll look at MySQL encryption at rest.

At Percona, we work with a number of clients that require strong security measures for PCI, HIPPA and PHI compliance, where data managed by MySQL needs to be encrypted “at rest.” As with all things open source, there several options for meeting the MySQL encryption at rest requirement. In this three-part series, we cover several popular options of encrypting data and present the various pros and cons to each solution. You may want to evaluate which parts of these tutorials work best for your situation before using them in production.

Part one of this series is implementing disk-level encryption using crypt+LUKS.

In MySQL 5.7, InnoDB has built-in encryption features. This solution has some cons, however. Specifically, InnoDB tablespace encryption doesn’t cover undo logs, redo logs or the main ibdata1 tablespace. Additionally, binary-logs and slow-query-logs are not covered under InnoDB encryption.

Using crypt+LUKS, we can encrypt everything (data + logs) under one umbrella – provided that all files reside on the same disk. If you separate the various logs on to different partitions, you will have to repeat the tutorial below for each partition.

LUKS Tutorial

The Linux Unified Key Setup (LUKS) is the current standard for disk encryption. In the examples below, the block device /dev/sda4 on CentOS 7 is encrypted using a generated key, and then mounted as the default MySQL data directory at /var/lib/mysql.

WARNING! Loss of the key means complete loss of data! Be sure to have a backup of the key.

Install the necessary utilities:

# yum install cryptsetup

Creating, Formatting and Mounting an Encrypted Disk

The cryptsetup command initializes the volume and sets an initial key/passphrase. Please note that the key is not recoverable, so do not forget it. Take the time now to decide where you will securely store a copy of this key. LastPass Secure Notes are a good option, as they allow file attachments. This enhances our backup later on.

Create a passphrase for encryption. Choose something with high entropy (i.e., lots of randomness). Here are two options (pick one):

# openssl rand -base64 32
# date | md5 | rev | head -c 24 | md5 | tail -c 32

Next, we need to initialize and format our partition for use with LUKS. Any mounted points using this block device must be unmounted beforehand.

WARNING! This command will delete ALL DATA ON THE DEVICE! BE SURE TO COMPLETE ANY BACKUPS BEFORE YOU RUN THIS!

# cryptsetup -c aes-xts-plain -v luksFormat /dev/sda4

You will be prompted for a passphrase. Provide the phrase you generated above. After you provide a passphrase, you now need to “open” the encrypted disk and provide a device mapper name (i.e., an alias). It can be anything, but for our purposes, we will call it “mysqldata”:

# cryptsetup luksOpen /dev/sda4 mysqldata

You will be prompted for the passphrase you used above. On success, you should see the device show up:

# ls /dev/mapper/
lrwxrwxrwx  1 root root      7 Jun  2 11:50 mysqldata -> ../dm-0

You can now format this encrypted block device and create a filesystem:

# mkfs.ext4 /dev/mapper/mysqldata

Now you can mount the encrypted block device you just formatted:

# mount /dev/mapper/mysqldata /var/lib/mysql

Unfortunately you cannot add this to /etc/fstab to automount on a server reboot, since the key is needed to “open” the device. Please keep this in mind that if your server ever reboots MySQL will not start since the data directory is unavailable until opened and mounted (we will look at how to make this work using scripts in Part Two of this series).

Creating a Backup of Encryption Information

The header of a LUKS block device contains information regarding the current encryption key(s). Should this ever get damaged, or if you need to recover because you forgot the new passphrase, you can restore this header information:

# cryptsetup luksHeaderBackup --header-backup-file ${HOSTNAME}_`date +%Y%m%d`_header.dat /dev/sda4

Go ahead and make a SHA1 of this file now to verify that it doesn’t get corrupted later on in storage:

# sha1sum ${HOSTNAME}_`date +%Y%m%d`_header.dat

GZip the header file. Store the SHA1 and the .gz file in a secure location (for example, attach it to the secure note created above). Now you have a backup of the key you used and a backup of the header which uses that key.

Unmounting and Closing a Disk

If you know you will be storing a disk, or just want to make sure the contents are not visible (i.e., mounted), you can unmount and “close” the encrypted device:

# umount /var/lib/mysql/
# cryptsetup luksClose mysqldata

In order to mount this device again, you must “open” it and provide one of the keys.

Rotating Keys (Adding / Removing Keys)

Various compliance and enforcement rules dictate how often you need to rotate keys. You cannot rotate or change a key directly. LUKS supports up to eight keys per device. You must first add a new key to any slot (other than the slot currently occupying the key you are trying to remove), and then remove the older key.

Take a look at the existing header information:

# cryptsetup luksDump /dev/sda4
LUKS header information for /dev/sda4
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 4096
MK bits: 256
MK digest: 81 37 51 6c d5 c8 32 f1 7a 2d 47 7c 83 62 70 d9 f7 ce 5a 6e
MK salt: ae 4b e8 09 c8 7a 5d 89 b0 f0 da 85 7e ce 7b 7f
47 c7 ed 51 c1 71 bb b5 77 18 0d 9d e2 95 98 bf
MK iterations: 44500
UUID: 92ed3e8e-a9ac-4e59-afc3-39cc7c63e7f6
Key Slot 0: ENABLED
Iterations: 181059
Salt: 9c a9 f6 12 d2 a4 2a 3d a4 08 b2 32 b0 b4 20 3b
69 13 8d 36 99 47 42 9c d5 41 35 8c b3 d0 ff 0e
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

Here we can see a key is currently occupying “Key Slot 0”. We can add a key to any DISABLED key slot. Let’s use slot #1:

# cryptsetup luksAddKey --key-slot 1 -v /dev/sda4
Enter any passphrase:
Key slot 0 unlocked.
Enter new passphrase for key slot:
Verify passphrase:
Command successful.

LUKS asks for “any” passphrase to authenticate us. Had there been keys in other slots, we could have used any one of them. As only one is currently saved, we have to use it. We can then add a new passphrase for slot 1.

Now that we have saved the new key in slot 1, we can remove the key in slot 0.

# cryptsetup luksKillSlot /dev/sda4 0
Enter any remaining LUKS passphrase:
No key available with this passphrase.

In the example above, the existing passphrase stored in slot 0 was used. This is not allowed. You cannot provide the passphrase for the same slot you are attempting to remove.

Repeat this command and provide the passphrase for slot 1, which was added above. We are now able to remove the passphrase stored in slot 0:

# cryptsetup luksKillSlot /dev/sda4 0
Enter any remaining LUKS passphrase:
# cryptsetup luksDump /dev/sda4
LUKS header information for /dev/sda4
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 4096
MK bits: 256
MK digest: 81 37 51 6c d5 c8 32 f1 7a 2d 47 7c 83 62 70 d9 f7 ce 5a 6e
MK salt: ae 4b e8 09 c8 7a 5d 89 b0 f0 da 85 7e ce 7b 7f
47 c7 ed 51 c1 71 bb b5 77 18 0d 9d e2 95 98 bf
MK iterations: 44500
UUID: 92ed3e8e-a9ac-4e59-afc3-39cc7c63e7f6
Key Slot 0: DISABLED
Key Slot 1: ENABLED
Iterations: 229712
Salt: 5d 71 b2 3a 58 d7 f8 6a 36 4f 32 d1 23 1a df df
cd 2b 68 ee 18 f7 90 cf 58 32 37 b9 02 e1 42 d6
Key material offset: 264
AF stripes: 4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

After you change the passphrase, it’s a good idea to repeat the header dump steps we performed above and store the new passphrase in your vault.

Conclusion

Congratulations, you have now learned how to encrypt and mount a partition using LUKS! You can now use this mounted device just like any other. You can also restore a backup and start MySQL.

In Part Two, we will cover using InnoDB tablespace encryption.

via Planet MySQL
MySQL Encryption at Rest – Part 1 (LUKS)

Drake Winning Sampling Case Over Fair Use Is Big News… But Still Demonstrates The Madness Of Music Licensing

Something big happened last week in the world of music and copyright: a case about a music sample was won on fair use grounds. This basically never happens for a variety of problematic historical reasons. And yet, it did. The hip hop artist Drake was found not to be infringing on a Jimmy Smith composition due to fair use. And that’s a big deal — though the case also highlights the ongoing madness of today’s copyright licensing laws (even beyond sampling). But we’ll get there eventually. Let’s start with the issue of copyright and sampling.

For years, we’ve talked about the pure madness of copyright law and music sampling. If you’ve never seen it, the documentary Copyright Criminals, is worth your time — as it demonstrates how a bunch of stuffed shirt lawyers and clueless judges basically killed off an entire art form by demanding money for every tiny sample, no matter how much musicians transformed that sample. Album’s like De La Soul’s "3 Feet High and Rising" or the Beastie Boy’s "Paul’s Boutique" simply could not be made today — which is just crazy. And the absolute worst court ruling regarding sampling was Grand Upright Music v. Warner Bros. from 1991 in which Gilbert O’Sullivan sued Biz Markie for making what was effectively a hip hop parody of his one big hit. The judge in that case — Kevin Duffy — never seemed to have any grasp of music, art, culture or even copyright law. His ruling in that case starts off with a total confusion about the difference between "stealing" and "copyright infringement."

"Thou shalt not steal." has been an admonition followed since the dawn of civilization. Unfortunately, in the modern world of business this admonition is not always followed. Indeed, the defendants in this action for copyright infringement would have this court believe that stealing is rampant in the music business and, for that reason, their conduct here should be excused. The conduct of the defendants herein, however, violates not only the Seventh Commandment, but also the copyright laws of this country.

That’s… a bad way to open things. And, that case changed sampling. The other big case in this genre of bad sampling rulings is Bridgeport Music v. Dimension Films in which Judge Ralph Guy, bizarrely summarized things as follows:

Get a license or do not sample. We do not see this as stifling creativity in any significant way.

Notice the lack of any consideration of fair use or transformative works or anything of that nature.

And, tragically, few cases have really challenged this view since. While lots of lawsuits are filed over sampling, most settle. It’s rare for anyone to make a fair use argument. To some extent, it’s really seemed like the record labels themselves haven’t wanted any of these cases to go to trial, because they’d hate to have a ruling that says sampling is fair use. Over the past few years, we’ve seen a few cases pop up where we hoped we’d get a court to recognize fair use in sampling — and yet they all seem to settle before the cases get that far. Getting such a judgment on the books would be a big, big deal and might (once again) revolutionize culture and unleash tremendous creativity.

And so now we have the Drake case, which is, undoubtedly, a good ruling. But it’s not clear it’s going to make as big a difference as some might hope. The details here are… rather specific. Drake’s song Pound Cake / Paris Morton Music 2 opens with a slightly altered, but clear "sample" of famed jazz artist Jimmy Smith’s Jimmy Smith Rap. You might think that the Jimmy Smith Rap is a rap song, but it’s just Jimmy Smith talking (it appears extemporaneously) about the fun he and some others had making the album Off the Top. But the recording got included on the album as a separate track. It’s not a song. It’s just Jimmy Smith talking. The Drake song uses a large chunk of the Jimmy Smith Rap unchanged… but does make a few small edits, including changing Smith from saying "Jazz is the only real music that’s gonna last. All the other bullshit is here today and gone tomorrow" to just saying "Only real music’s gonna last. All that other bullshit is here today and gone tomorrow." Apparently the Jimmy Smith estate wasn’t too happy with the changed meaning.

But here’s the oddity: Drake’s label licensed that track. So everything should be fine, right? Wrong. You forgot: music licensing is a swampy mess of insanity and patched together weirdness. As we’ve discussed elsewhere, when using a song, there are multiple different licenses you might need to get. You have to do one thing to license the sound recording, but something else entirely to license the "composition." The theory there is that one license pays the musicians and another pays the songwriters (though, in reality, it’s often middlemen who get the money). Here, it seems that Drake’s label didn’t license the "composition" to pay the "songwriter." And your first reaction might damn well be "what songwriter? there’s no damn song!" And you’d be right. Hell, even Jimmy Smith never registered the copyright as a composition. It was only his estate that registered the copyright 31 years after the not-really-a-song was released and only after they heard the Drake song and decided they didn’t like it at all.

So, then, after registering the copyright on the composition (and even though the sound recording was properly licensed), the Jimmy Smith Estate sued Drake. And it’s this that’s found to be fair use. The judge, William Pauley, goes through the four factors. The first one, discussing whether or not the work is transformative may be the most interesting. The judge looks at a few different ways that Drake’s lawyers argued the use was transformative — and actually rejects two of the three arguments. He’s not impressed by the argument that because Drake doesn’t reference Jimmy Smith’s album, he’s using the words to refer to the process of making his own album (which is… a very weak argument). Similarly, he doesn’t buy the fact that the addition of some quiet background music and general shifting of the words around is transformative. That… seems like a valid fair use analysis.

But the argument Judge Pauley finds convincing is interesting. He accepts the idea that by changing the meaning of the words, by cutting out the "jazz is the" from the "only real music that’s gonna last," Drake may have created a transformative work:

Defendants’ first argument, on the other hand, strikes on a compelling reason to
find this use transformative. There can be no reasonable dispute that the key phrase of JSR—
“Jazz is the only real music that’s gonna last. All that other bullshit is here today and gone
tomorrow. But jazz was, is and always will be.”—is an unequivocal statement on the primacy of
jazz over all other forms of popular music. Defendants’ use of JSR, by contrast, transforms
Jimmy Smith’s brazen dismissal of all non-jazz music into a statement that “real music,” with no
qualifiers, is “the only thing that’s gonna last.” Thus, Defendants’ “purposes in using [the
original work] are sharply different from [the original artist’s] goals in creating it.” Blanch v.
Koons, 467 F.3d 244, 252 (2d Cir. 2006). This is precisely the type of use that “adds something
new, with a further purpose or different character, altering the first [work] with new expression,
meaning, or message.”

I’ll admit I’m surprised (pleasantly so…) by this part of the ruling. If followed by other courts (and this is a non-precedential district court ruling, so don’t get too excited…) that alone could be pretty big. Though, again, it’s focused on changing the meaning of the composition and not the music… so not that useful for other music sampling cases.

As for the other factors, the judge argues that the second factor (the nature of the work) weighs against fair use. I’d actually argue that this one should have gone the other way, especially seeing as the "composition" wasn’t actually a "composition" but just someone talking about his experience… but, that’s not what happened here. On the third factor, on the amount used — again, the court surprises me. Many courts tend to just look at the overall amount used and if it’s a lot they say "no fair use" — with a few importance exceptions. And, Drake used most of the Jimmy Smith Rap, even if it’s rearranged. But relying on the important ruling in the Google Books case, Judge Pauley notes that the question here is whether or not the amount of copying was "reasonable in relation to the purpose of the copying" rather than at an absolute level. And here, it weighs towards fair use:

Here, the Court finds the amount taken by Defendants to be reasonable in
proportion to the needs of the intended transformative use. Far from being extraneous to Pound
Cake’s statement on the importance of “real” music, Defendants’ use of the lines describing the
recording of Off the Top serve to drive the point home. The full extent of the commentary is, in
this Court’s view, that many musicians make records in similar ways (e.g. with the help of A&R
experts or the stimulating effects of champagne), but that only “real” music—regardless of
creative process or genre—will stand the test of time. Accordingly, this factor favors a finding
of fair use.

Finally, on factor four — the impact on the market — the court again finds in favor of fair use:

There is no evidence in the record to suggest that Pound Cake usurps any
potential market for JSR or its derivatives. JSR, a spoken-word criticism of non-jazz music at
the end of an improvisational jazz album, targets a sharply different primary market than Pound
Cake, a hip-hop track. Further, Plaintiffs never attempted to establish a market for licensed
derivative uses of the JSR composition copyright until Defendants used the recording on the
Album. See Campbell, 510 U.S. at 592 (“The market for potential derivative uses includes only
those that the creators of original works would in general develop or license others to develop.”).
These considerations, coupled with the finding that Defendants’ use is highly transformative,
forestalls the conclusion that Defendants took such “sufficiently significant portions of the
original as to make available a significantly competing substitute.” Authors Guild, 804 F.3d at
223. Thus, the fourth factor favors the Defendants.

That seems pretty straightforward and correct.

Thus, with three of the four factors — including the big first one — pushing towards fair use, the use is declared to be fair, and thus not infringing.

I wouldn’t be surprised to see the case appealed — but the 2nd Circuit Appeals court has a history of being pretty good on fair use, so hopefully… it would hold up. Still, given the specifics of this case, and mostly the fact that it’s about the composition, rather than the sound recording, I’m not sure that any ruling here would have that big an impact on sampling. We still need a better sampling case to hit the courts where fair use might be a useful tool.

Permalink | Comments | Email This Story

via Techdirt
Drake Winning Sampling Case Over Fair Use Is Big News… But Still Demonstrates The Madness Of Music Licensing