Skip to main content

Posts

Downgrading from MySQL 5.6 to MySQL 5.5

Last week I had to downgrade from MySQL 5.6 to 5.5. The reason for this was that the application used a very old Connector/J and that's incompatible with MySQL 5.6 because the removal of SET OPTION syntax. We're now planning to upgrade Connector/J to be able to upgrade to 5.6 again. There are two methods of downgrading: Dump/Restore with mysqldump. This is easy and reliable, but can take more time. In place (replace binaries, don't change data). This fast, but won't work if file formats have changed. As expected this is documented in the MySQL Reference Manual. I went for the in place method. I expected this to work without many issues as this database was not using the fancy new features like fulltext indexes for InnoDB. All tables used the A ntelope format. As both MySQL versions support A ntelope and B arracuda this shoud be fine. I don't know why Oracle didn't introduce a new C heeta format with the introduction of the fulltext indexes. The i...

CIS Oracle MySQL 5.6 Security Benchmark

I've been working on the CIS security benchmark for Oracle MySQL 5.6. There already is a benchmark document for earlier versions of MySQL. The benchmark document helps you to ensure you have a secure configuration for MySQL. Center for Internet Security (CIS) is a nonprofit organization. The Call For Participation is now open. If you are already a CIS member then you can download the document here . If you don't have an account you can register for free.

Putting MySQL Cluster in a container

To get more familiar with docker and to create a test setup for MySQL Cluster I created docker images for the various components of MySQL Cluster (a.k.a. NDB Cluster) At first I created a Fedora 20 container and ran all components in one container. That worked and is quite easy to setup. But that's not how one is supposed to use docker. So I created Dockerfile 's for all components and one base image. The base image: contains the MySQL Cluster software has libaio installed has a mysql user and group  serves as a base for the other images The management node (ndb_mgmd) image: Has ndb_mgmd as entrypoint Has a config.ini for the cluster config Should be started with " --name=mymgm01 " The data node (ndbmtd) image: Has ndbmtd as entrypoint Uses the connect string: " host=${MGM01_PORT_1186_TCP_ADDR}:1186 " Should be started with " --link mymgm01:mgm01 " to allow it to connect to the management node. You should create 2 container...

The new cloud backup option of MySQL Enterprise Backup

MySQL Enterprise Backup 3.10 support backups to the cloud. The only supported cloud service is Amazon S3. When the cloud destination is used mysqlbackup will upload the backup as an image file. You can specify all options on the commandline: mysqlbackup --cloud-service=s3 --cloud-aws-region=eu-west-1 \ --cloud-access-key-id=AKIAJLGCPXEGVHCQD27B \ --cloud-secret-access-key=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 \ --cloud-bucket=meb_myserver --cloud-object-key=firstbackup --cloud-trace=0 \ --backup-dir=/tmp/firstbackup --backup-image=- --with-timestamp backup-to-image But you can also put the settings in the my.cnf [mysqlbackup_cloud] cloud-service=s3 cloud-aws-region=eu-west-1 cloud-access-key-id=AKIAJLGCPXEGVHCQD27B cloud-secret-access-key=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 cloud-bucket=meb_myserver cloud-trace=0 backup-dir=/data/cloudbackup backup-image=- with-timestamp The with-timestamp option is important as the backup won't start if the backup-dir already...

MySQL User Group Meetup in Amsterdam

This Tuesday Markus Winand will talk at the MySQL User Group NL meetup about "Indexes: The neglected performance all-rounder" . Markus is known for the http://use-the-index-luke.com website and the SQL Performance Explained book. Date: Tuesday August 12 Location: Marktplaats/eBay Office Amsterdam Registration: http://www.meetup.com/MySQL-User-Group-NL/events/196440532/

Decoding (encrypted) MySQL traffic with Wireshark

In a comment on my post about Using SSL with MySQL xiaochong zhang asked if it is possible to decode SSL/TLS encrypted MySQL traffic. The short answer is: It depends. To test this we need a MySQL server which is SSL enabled. I used MySQL Sandbox to create a sandboxed 5.6.19 server. Then I used mysslgen to create the config and the certificates. $ make_sandbox 5.6.19 $ ./mysslgen.py --config=sandboxes/msb_5_6_19/my.sandbox.cnf --ssldir=sandboxes/msb_5_6_19/ssl This assumes there already is a extracted tarball of MySQL 5.6.19 in ~/mysql/5.6.19 The mysslgen.py script will return a message with the changes you should make in your mysqld and client sections of the my.sandbox.cnf file. Then restart the server to make it active. For SSL to work we need to connect using TCP/IP instead of over a UNIX socket. So we connect with "./my sql -h 127.0.0.1". Now execute "\s" or "status" to see if we're indeed using SSL. It probably looks like this: mys...

Oracle Critical Patch Update for MySQL

Oracle has released the Critical Patch Update (CPU) for July 2014. The Oracle MySQL Risk Matrix lists 10 security fixes. It took me some time to understand the subcomponent names. So here is the list with the full name of each subcomponent: Subcomponent Full name SRFTS Server: Full Text Search SRINFOSC Server: INFORMATION_SCHEMA SRCHAR Server: Character sets ENARC Engine: Archive SROPTZR Server: Optimizer SRREP Server: Replication SRSP Server: Stored Procecure ENFED Engine: Federated I don't think there is anything really important in the list, but it might be a good trigger to update to the latest release. Upgrading should be easy especially if you're using the APT or YUM repositories from Oracle. If you're upgrading to a new major release (e.g. from 5.5 to 5.6) then you should read the instructions in the reference manual.