Drag. Thrust. Lift. Jet engines. Propellers. Wings. This animation breaks down just exactly how an airplane flies and it’s pretty damn interesting. Each design element of the plane basically solves a law of physics and is part of the reason how an airplane can fly.
Take the shape of a wing, it produces lift from its slightly inclined and special airfoil shape. The airfoil shape of a wing deflects more air at the bottom of the wing, so when its running down a runway, for example, higher pressure and more upward force is produced below the wing vs the lower pressure and less downward force above the wing. This creates lift. Which makes flying a lot easier.
I’ve previously evaluated MariaDB’s 10.1 implementation of data encryption at rest (http://ift.tt/1QnLtVl), and recently did the same for Oracle’s implementation (http://ift.tt/1Ve0tg1) in their MySQL 5.7. First, here’s a walkthrough of enabling encryption for MySQL 5.7:1. Install keyring plugin.1a. Add the following to the [mysqld] section of /etc/my.cnf:… early-plugin-load=keyring_file.so1b. Restart the server:… service mysqld restart1c. Verify:… mysql> SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE ‘keyring%’; +————–+—————+ | PLUGIN_NAME | PLUGIN_STATUS | +————–+—————+ | keyring_file | ACTIVE | +————–+—————+2. Ensure innodb_file_per_table is on.2a. Check…. mysql> show global variables like ‘innodb_file_per_table’; +———————–+——-+ | Variable_name | Value | +———————–+——-+ | innodb_file_per_table | ON | +———————–+——-+2b. If OFF, add the following to the [mysqld] section of /etc/my.cnf, restart, and alter each existing table to move it to its own tablespace: innodb_file_per_table=ONGet list of available InnoDB tables: mysql>select table_schema, table_name, engine from information_schema.tables where engine=’innodb’ and table_schema not in (‘information_schema’);Run ALTER … ENGINE=INNODB on each above InnoDB tables: mysql><strong>ALTER</strong> TABLE [TABLE_SCHEMA].[TABLE_NAME] ENGINE=INNODB; Next, I walked through some testing.1. Create some data…. [root@localhost ~]# mysqlslap –concurrency=50 –number-int-cols=2 –number-char-cols=3 –auto-generate-sql –auto-generate-sql-write-number=10000 –no-drop2. Observe the mysqlslap.t1 table is not automatically encrypted. Unlike MariaDB’s implementation, there is not an option to encrypt tables by default.2a. Via the mysql client:… mysql> SELECT TABLE_SCHEMA, TABLE_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE CREATE_OPTIONS LIKE ‘%ENCRYPTION=”Y”%’; Empty set (0.05 sec)2b. Via the command line:(Install xxd if required.)… [root@localhost ~]# yum install vim-common… [root@localhost ~]# xxd /var/lib/mysql/mysqlslap/t1.ibd | grep -v “0000 0000″ | less … 0010dc0: 5967 4b30 7530 7942 4266 664e 6666 3143 YgK0u0yBBffNff1C 0010dd0: 5175 6470 3332 536e 7647 5761 3654 6365 Qudp32SnvGWa6Tce 0010de0: 3977 6576 7053 3730 3765 4665 4838 7162 9wevpS707eFeH8qb 0010df0: 3253 5078 4d6c 6439 3137 6a7a 634a 5465 2SPxMld917jzcJTe …3. Insert some identifiable data into the table:… mysql> <strong>insert</strong> into mysqlslap.t1 values (1,2,”private”,”sensitive”,”data”); Query OK, 1 row affected (0.01 sec) mysql> select * from mysqlslap.t1 where charcol2=”sensitive”; +———+———+———-+———–+———-+ | intcol1 | intcol2 | charcol1 | charcol2 | charcol3 | +———+———+———-+———–+———-+ | 1 | 2 | private | sensitive | data | +———+———+———-+———–+———-+ 1 row in set (0.02 sec)4. Observe this data via the command line:… [root@localhost ~]# xxd /var/lib/mysql/mysqlslap/t1.ibd | grep -v “0000 0000″ | less … 04fa290: 0002 7072 6976 6174 6573 656e 7369 7469 ..privatesensiti …5. Encrypt the mysqlslap.t1 table:… mysql> <strong>alter</strong> table mysqlslap.t1 encryption=’Y’; Query OK, 10300 rows affected (0.31 sec) Records: 10300 Duplicates: 0 Warnings: 06. Observe the mysqlslap.t1 table is now encrypted:6a. Via the mysql client:… mysql> SELECT TABLE_SCHEMA, TABLE_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE CREATE_OPTIONS LIKE ‘%ENCRYPTION=”Y”%’; +————–+————+—————-+ | TABLE_SCHEMA | TABLE_NAME | CREATE_OPTIONS | +————–+————+—————-+ | mysqlslap | t1 | ENCRYPTION=”Y” | +————–+————+—————-+6b. Via the command line:… [root@localhost ~]# xxd /var/lib/mysql/mysqlslap/t1.ibd | grep “private” [root@localhost ~]#6c. Observe snippet of the file:… [root@localhost ~]# xxd /var/lib/mysql/mysqlslap/t1.ibd | grep -v “0000 0000″ | less … 0004160: 56e4 2930 bbea 167f 7c82 93b4 2fcf 8cc1 V.)0….|…/… 0004170: f443 9d6f 2e1e 9ac2 170a 3b7c 8f38 60bf .C.o……;|.8`. 0004180: 3c75 2a42 0cc9 a79b 4309 cd83 da74 1b06 &lt;u*B….C….t.. 0004190: 3a32 e104 43c5 8dfd f913 0f69 bda6 5e76 :2..C……i..^v …7. Observe redo log is not encrypted:… [root@localhost ~]# xxd /var/lib/mysql/ib_logfile0 | less … 23c6930: 0000 0144 0110 8000 0001 8000 0002 7072 …D……….pr 23c6940: 6976 6174 6573 656e 7369 7469 7665 6461 ivatesensitiveda 23c6950: 7461 3723 0000 132e 2f6d 7973 716c 736c ta7#…./mysqlsl …This is expected because the documentation (http://ift.tt/1Ve0tg1) reports encryption of files outside the tablespace is not supported: “Tablespace encryption only applies to data in the tablespace. Data is not encrypted in the redo log, undo log, or binary log.”ConclusionsI found in my testing of MariaDB’s implementation of data encryption at rest that there were still places on the file system that a bad actor could view sensitive data. I’ve found the same in this test of Oracle’s implementation. Both leave data exposed in log files surrounding the tablespace files.BonusAs a bonus to this walkthrough, during this testing, the table definition caught my eye:… mysql> show create table mysqlslap.t1\G *************************** 1. row *************************** Table: t1 Create Table: CREATE TABLE `t1` ( `intcol1` int(32) DEFAULT NULL, `intcol2` int(32) DEFAULT NULL, `charcol1` varchar(128) DEFAULT NULL, `charcol2` varchar(128) DEFAULT NULL, `charcol3` varchar(128) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ENCRYPTION=’Y’ 1 row in set (0.00 sec)As discussed in http://ift.tt/1QnLtVn, the MariaDB implementation does not include the “encrypted=yes” information in the table definition when tables are implicitly encrypted.I was curious what would happen if I did a mysqldump of this encrypted table and attempted to restore it to a nonencrypted server. DBAs expect mysqldump to create a portable file to recreate the table definition and data on a different version of mysql. During upgrades, for example, you might expect to use this for rollback.Here is my test. I first did the dump and looked inside the file…. [root@localhost ~]# mysqldump mysqlslap t1 > mysqlslap_t1_dump [root@localhost ~]# less mysqlslap_t1_dump … CREATE TABLE `t1` ( `intcol1` int(32) DEFAULT NULL, `intcol2` int(32) DEFAULT NULL, `charcol1` varchar(128) DEFAULT NULL, `charcol2` varchar(128) DEFAULT NULL, `charcol3` varchar(128) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ENCRYPTION=’Y’; <strong>INSERT</strong> INTO `t1` VALUES ( … ,(1,2,’private’,’sensitive’,’data’);As expected, that definition makes the dump less portable. The restore from dump is not completed and throws an error (this is not remedied by using –force):On a slightly older 5.7 version:… mysql> select version(); +———–+ | version() | +———–+ | 5.7.8-rc | +———–+ [root@centosmysql57 ~]# mysql mysqlslap < mysqlslap_t1_dump ERROR 1064 (42000) at line 25: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ENCRYPTION=’Y” at line 7On a different fork:… MariaDB [(none)]> select version(); +—————–+ | version() | +—————–+ | 10.1.12-MariaDB | +—————–+ 1 row in set (0.00 sec) [root@maria101 ~]# mysql mysqlslap < mysqlslap_t1_dump ERROR 1911 (HY000) at line 25: Unknown option ‘ENCRYPTION’This doesn’t have anything to do with the encrypted state of the data in the table, just the table definition. I do like the encryption showing up in the table definition, for better visibility of encryption. Maybe the fix is to have mysqldump strip this when writing to the dump file.
via Planet MySQL Data Encryption at Rest in Oracle MySQL 5.7
Percona is excited to announce the launch of Percona Monitoring and Management Beta!
Percona Monitoring and Management (PMM) is a fully open source solution for both managing MySQL platform performance and tuning query performance. It allows DBAs and application developers to optimize the performance of the Database Layer. PMM is an on-premises solution that keeps all of your performance and query data inside the confines of your environment, with no requirement for any data to cross the internet.
Assembled from a supported package of “best of breed” open source tools such as Prometheus, Grafana and Percona’s Query Analytics, PMM delivers results right out of the box.
With PMM, anyone with database maintenance responsibilities can get more visibility for actionable enhancements, realize faster issue resolution times, increase performance through focused optimization, and better manage resources. More information allows you to concentrate efforts on the areas that yield the highest value, rather than hunting and pecking for speed.
PMM monitors and provides performance data for Oracle’s MySQL Community and Enterprise Editions as well as Percona Server for MySQL and MariaDB.
Download Percona Monitoring and Management now.
via Planet MySQL Percona Monitoring and Management
Do you remember the Green Destiny sword from Crouching Tiger, Hidden Dragon. I didn’t. But that damascus steel blade finished with jade is so damn gorgeous and stunningly detailed that after seeing the guys at Baltimore Knife and Sword make it, I don’t think I’ll ever forget it again. The whole build process is so intensive. From how they alternate and stack different metals to folding the metal on top of each other to etching out the design and carving the jade and then adding the finishing touches, it’s one of the most beautifully intricate swords they’ve ever made.
We get to see the Earth in high definition every day, it’s true, but we’re limited to a certain ground-level point of view. Not so much the astronauts aboard the International Space Station. And they’ve just sent down a batch of stunning 4K footage of the Earth taken with their fancy RED Epic Dragon camera. Read More
Want to make subtitles for a certain TV episode or movie? There are a handful of online communities where you can download all kinds of free subtitles, so we recommend starting there and making sure someone else hasn’t already created the subtitles that you need. Subtitling can be a fun hobby if you have some free time, and it can even be valuable practice if you want to make money with video and audio transcription. Or it can be a way to give back to the community by providing free subtitles to the communities mentioned above. In this post, we’ll cover two…
Two weeks ago I paid to have lasers fired into my eyes. The next day I woke up like Peter Parker, post-spider bite. I couldn’t climb walls, but I could see so well I felt like a superhero. For the first time since I was a kid I could open my eyes and just see. My laser eye surgery story isn’t quite comic book-worthy, but here’s everything that happened, in case you want those powers too.
I’ve had so-so vision for most of my life. I wasn’t completely hopeless without my glasses, but contacts bothered my eyes so I needed them—and I hated it. I desperately wanted to go running and actually see where I was going. I wanted to play basketball and pass the ball to my teammates, not the guy on the other team wearing a similarly colored shirt. I wanted to wear cool sunglasses that weren’t expensive prescription ones. And, in a less practical but still important sense, I wanted the comfort of knowing that if the world ended tomorrow I wouldn’t be reliant on my glasses for survival. So I started saving and began my journey toward super-vision.
Why I Chose LASIK and How I Found a Doctor
Right off the bat I learned that refractive surgery comes in a wide variety of flavors. There’s LASIK, PRK, RLE, Epi-LASIK, PRELEX, Intacs, and many more. Which is right for you will vary (and your doctor can help,) but in my case, LASIK was the most common procedure for someone in my situation. It’s fairly safe, and the least invasive. It might not be right for everyone, but if you meet these criteria, it might be for you too:
You’re at least 18 years old.
Your eye prescription has been (relatively) stable for at least one year prior.
Your pupils dilate properly.
Your corneas are healthy in relation to your prescription, both in thickness and topography.
You have healthy eye pressure.
You can afford it. LASIK is rarely, if ever, covered by insurance.
You can’t really test most of these things on your own, however, so you’ll need to find an ophthalmologist. Fortunately, most laser eye surgery offices will give you a free consultation. This is great for a few reasons: you can find out if you’re a candidate, get a feel for the doctor and their staff, learn about the procedure, and see what kind of tools they have (I like to ask how new the equipment is). These consultations are also a way to make the rounds and visit as many doctors as you can before you make your choice. Don’t just rely on a free consultation, however. See your optometrist that you trust first and ask if you’re a good candidate for laser eye surgery before you make your rounds.
It’s not easy to decide on a doctor when there’s a sea of billboards and shady places offering “specials.” Do some research, ask your optometrist for a referral, talk to friends who have had laser eye surgery, and check reviews on services like Yelp and Google—and actually read the reviews. Don’t just look at stars. Reviewers usually do a pretty good job of describing the process, so you get a good idea of what the service, wait time, and overall experience will be like. I compared reviews for multiple places to get consultations at, like LA Sight and Lasik Eye Center, but the doctor I finally ended up with was Dr. Paul C. Lee at the California Center for Refractive Surgery. Their office was top notch, they had all of the latest equipment, the staff was more than welcoming, Dr. Lee was very knowledgeable and experienced, and most importantly, I felt comfortable putting my eyesight in their hands.
LASIK isn’t cheap (usually around $1,500 to $2,000 an eye), so be wary of any place that is offering any crazy deals or steep discounts. Go with your gut; if a place seems sketchy (like this place with seemingly constant scheduling problems and equipment sitting out in a hallway), don’t waste your time. Generally speaking, you get what you pay for when it comes to laser eye surgery. This is one area in your life where I recommend going for the best of the best, no matter how frugal you are.
Make sure you’re getting your money’s worth too. The place I went with does an all-inclusive eye treatment package. I paid $4,000 for my procedure ($2,000 down, $2,000 payment plan over eight months at 0% interest), but it included medicinal eye drops (like antibiotics and steroids to promote a speedy recovery), as many follow-up appointments as I wanted, round the clock support if I had questions or concerns, and—here’s the clincher—free enhancement treatments for the first year if I need them or end up being unhappy with my sight. Some places might try to tack on fees for medicine, additional appointments, and charge up to $500 an eye for enhancement treatments, so be sure to shop around and make sure your money is being put to good use.
Before My Operation: Tests, Warnings, and Very Bright Lights
Before my surgery, the doctors thoroughly checked my eye health with a huge battery of tests (sometimes with things touching my eyes, for the squeamish) to make sure everything was good before the procedure. I had my prescription checked in typical fashion (“Number one, or number two?”), had my retinas examined with light I can only describe as “brighter than God,” had my eyes poked with what looked like a digital thermometer to check my eye pressure, and stared into the Death Star’s turbolaser so they could map out the topography and curvature of my eyes.
I asked refractive consultant Nikki Lapitan at CCRS (full disclosure: she helped me get my eye surgery done) about the reasoning behind these tests. She explained that they look for underlying conditions that could cause complications with the procedure, in addition to checking your general eye health. They needed to make sure I didn’t have glaucoma, high eye pressure, optic nerve issues, or amblyopia (lazy eye); all of which would need to be addressed before having laser eye surgery. They also check the thickness of your cornea to make sure they have enough to work with. Unlike other refractive surgery, LASIK does all of it’s enhancing in the corneal tissue of your eye; meaning if your corneas aren’t thick enough, they can’t do the procedure.
If you’re squeamish about things being near or in your eye, you will hate almost of all of the LASIK process—guaranteed. I’m pretty comfortable with it (I’m okay touching my eyeball) and there were moments when I thought “Okay, get the hell out of my eye please.” If you’re okay with things near your eyes—like if you’re a pro at putting in contacts—it’s not bad at all.
Once I was cleared for takeoff, they showed me a few short videos that explained how the procedure worked, one of which is above. Basically, they would cut a flap in my corneal tissue with either a microblade or femtosecond laser, flip the flap back, then fire some other lasers into my cornea to reshape it. This way corrected and focused light could reach the retina in the back of my eye. They also gave me a short rundown of what post-op recovery would be like (more on that later). After thinking things over for a few moments, I set a date and mentally prepared for my forthcoming super-vision. A note for contact wearers: you’ll have to ditch them and wear glasses for at least a couple weeks beforehand, probably longer if possible. Contacts affect the shape of your cornea, so you need to give your eyes time to return to their normal shape before anything can be done.
During the Procedure: More Lights and a Little Valium
The day finally came and I was both nervous and more excited than I’d ever been for anything. Like a kid going to Disneyland times a thousand excited. I showed up to the office and signed some paperwork regarding payment and confirming I understood that, like any medical procedure, there were risks involved. What kind of risks? Well, according to Dr. Peter Polack, who specializes in LASIK and laser cataract surgery, there are a few “worst case scenario complications” that are possible, but they usually occur after the procedure:
Infection: Surgery on my eyes is still surgery, so yeah, infection is possible while I’m healing. However, doctors take a lot of preventative measures and give you antibiotic drops to take while you’re healing, and common sense goes a long way here. Even a severe infection would not likely result in blindness.
Traumatic loss of the flap: Getting poked or jabbed in the eye so the flap tears before it has time to heal completely. If it’s just partially torn, it can be repositioned and heal just fine. If the flap is torn off completely and lost, the eye would heal over and I’d have to wear a contact lens in that eye or get a PRK laser procedure to fix it. Blindness or serious loss of vision is unlikely.
Diffuse Lamellar Keratitis or ‘Sands of Sahara Syndrome’: This occurs when certain chemicals or detergents used to sterilize equipment get caught between your eye and the flap, causing an inflammatory response that feels like your eyes are full of sand. This is very rare nowadays because the cause is known and avoided, but is still within the realm of possibility.
Most complications, however, are nowhere near as serious. When I asked Lapitan about common complications people experience, she explained that some people can get eye dryness, trouble seeing at night (oftenly referred to as seeing “halos”), and vision regression. In fact, the most likely worst case scenario is that I’ll require a two-step LASIK procedure, meaning I’ll need an enhancement done after the first procedure to reach 20/20 or better. Lapitan assured me that the lasers they use leave very little room for error during the actual procedure, and their practice, like many others, has a backup generator in case of power bumps or blackouts.
After I signed over my eyes, they gave me some Valium to help me relax. I was pretty excited because I’d never had it, but it wasn’t as fun as I was hoping. Honestly, it was the most disappointing part of the whole experience. I’d had a few other surgeries before and I was hoping to feel some of the “loopiness” I’d felt with other pre-op drugs in the past, but it just made me really subdued. I went to a relaxing/recovery room where there was a super comfy couch, water, blankets, and should I need it, a stuffed animal to cuddle and calm my nerves (yes, really).
After about 10 minutes relaxing with a cuddly rabbit, I was escorted to the operating room. They laid me down on a bed that swiveled under the first machine and covered me with a blanket.
The doctor came in, talked me through what was about to happen, and covered one of my eyes with a patch. He placed a metal contraption in my uncovered eye to keep it open (like in Clockwork Orange), but by then the Valium had fully kicked in and it didn’t bother me. In fact, the only thing that made me uncomfortable during the whole procedure was me feeling hungry.
The doctor dropped a few rounds of local anesthetic in my eye (you’re awake and aware through the entire procedure), and brought the first machine really close to my eye. And by close I mean literally touching and suctioning to my eyeball. I didn’t feel a thing, though, and only knew what was going on because of the info I was given beforehand. I was told to look into a light, and after a few flashes, a blurry haze overcame my vision. I was effectively blind (and couldn’t care less thanks to the Valium). Then the doctor repeated the process for the other eye. The video above shows what the process is like, but it’s actually scarier to watch than be a part of, I promise.
When the doctor finished the flaps in both my eyes, they moved me to the next laser. I laid down on a comfy bed again and had one of my eyes covered like with the first machine. I had more brackets put into my eye, and the doctor used a tweezers-like tool to pull back the flap in my eye. This was by far the most bizarre part of the process. In an instant my eye went from blurry blindness to seeing. Like someone had peeled me out of a see-through, hard-boiled egg.
Then the second machine got up close and personal. I watched a quick laser light show, and had the same process done to the other eye. The doctor squirted some antiseptic into my eyes, and I was escorted back into the relaxing/recovery room. I laid there for about half an hour, then went home with my ride (you can’t drive yourself home). I was in the doctor’s office for the grand total of an hour at most, and the actual procedure took all but 10 minutes.
Post-Op: The (Short) Road to Recovery
As I left the doctor’s office, I could already see. It was glorious. My eyes were super sensitive to light, though, so being outside was like being inside the sun. They gave me some sunglasses to help, but they could not stop the overwhelming light around me. It sucked. My buddy and I got some tacos, I took another Valium from the small sampler they gave me, and went home to sleep (which the doctors recommend).
I woke up around four hours later (tacos were a bad choice) and…I could see! I saw the clock across the room, I could read the books on my bookshelf, and it felt awesome. My eyes, however, did not feel awesome. The local anesthetic had long worn off and it felt like the sandman had severely overdone it and poured his entire bag of magic sand in my eyes. I used the numbing drops they gave me, took a Tylenol PM, and went back to sleep.
As I explained earlier, the next morning was basically that scene in Spider-Man where Peter Parker grabs his glasses, puts them on, and realizes he doesn’t need them because radioactive spider venom. I could see perfectly with 20/20 vision (and it continues to improve). They gave me antibiotic and steroid eye drops to use three times a day for a little over a week. I also had to go to a few follow-up appointments to make sure I was healing okay (one the next day, another a week after), but otherwise, that’s it! I can see. I’m still a little sensitive to light. Not “inside the sun” sensitive, but more like “I’m a recovering vampire” sensitive, and it’s getting better.
The cursed demon eye mask of Azmodeus.
The absolute worst part of the whole experience, however, was the eye mask you have to wear for one week while you’re sleeping. It’s not comfortable—at all. But you have to wear it so you don’t accidentally rub your eyes while you sleep (you’re not supposed to rub your eyes at all while you’re healing). For me, it was the only thing I really disliked about getting laser eye surgery.
Looking to the Future: The Long Term Effects
For most people, laser eye surgery works great (including myself). I was seeing 20/20 the day after my procedure, and Lapitan explained that most people attain at least 20/20 vision or better. Lapitan herself sees 20/15 after getting LASIK, and I can already tell that my vision is improving every day. But don’t just take my word for it; as of 2008, around 95% of those who underwent LASIK procedures were happy with the results.
If you’re wondering how long this super-vision lasts, the short answer is “it depends.” Some people get LASIK and never need vision correction ever again, while others regress after about 10 years and either have the procedure done again or go back to glasses and contacts. There’s no guarantee that your vision will be fixed permanently, and you can only have LASIK done so many times in a lifetime (you only have so much corneal tissue). You have to decide whether it’s worth it knowing that it could only last you so long. Personally, 10 years of perfect vision is better than a lifetime without it. All in all, I couldn’t be happier with my new super powers.