Showing posts with label MySQL Sandbox. Show all posts
Showing posts with label MySQL Sandbox. Show all posts

Monday, June 9, 2014

Quick test run with infobright

After reading Jonathan Levin's article about infobright I decided I had to try Infobright.

So I downloaded the 32-bit tarball. Normally I would have gone for a 64-bit build but those only came in RPM and DEB flavour.

Then I tried to run infobright community edition (ICE) in a MySQL Sandbox, but that failed as the resolveip utility failed to give an answer for localhost.


error while creating grant tables
Neither host 'daniel-thinkpad' nor 'localhost' could be looked up with
/home/dveeden/opt/mysql/4.0.7-ice/bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

Then I used docker. This went really smooth. You can grab my docker file here.

After creating a container with infobright I tried to insert some data... as I thought only UPDATE and DELETE were prohibited with ICE. But it turned out that also INSERT and ALTER TABLE .. ENGINE=.. are prohibited.

So you have to use LOAD DATA IN FILE which is fully documented in their data loading guide.

But there is an important difference between ICE and IEE (infobright enterprise edition): ICE uses the infobright loader and IEE uses the MySQL loader by default.

Loading some test data from the distroinfo-data package:

mysql> create table distroinfo(version decimal(3,1), codename varchar(20), series varchar(20), created datetime, `release` datetime, eol datetime);
Query OK, 0 rows affected (0.00 sec)

mysql> load data infile '/usr/share/distro-info/ubuntu.csv' into table distroinfo fields terminated by ',';
Query OK, 21 rows affected (0.06 sec)
Records: 21  Deleted: 0  Skipped: 0  Warnings: 0

But If I do the same with a MyISAM table:
mysql> load data infile '/usr/share/distro-info/ubuntu.csv' into table distroinfo2 fields terminated by ',';
Query OK, 21 rows affected, 23 warnings (0.00 sec)
Records: 21  Deleted: 0  Skipped: 0  Warnings: 22

So installing Infobright in a docker container is easy. Both ICE and IEE seem to be useful if you take the limitations of each in account. And you should be extremly careful with loading data with the Infobright loader as it might silently truncate your data!

Wednesday, March 27, 2013

Running Percona XtraDB Cluster in a Sandbox on Ubuntu

I wanted to do some experimentation with Percona XtraDB Cluster (Galera) and I didn't want to use virtual machines. I'm already using MySQL Sandbox for many other projects so that's the natural choice.

I've downloaded the tarball for Percona XtraDB Cluster 5.5.29 and I've extracted it to ~/opt/mysql/5.5.29-pxc.

Then I've installed 3 nodes:
make_sandbox 5.5.29-pxc -- --sandbox_port 4551 \
--sandbox_directory msb_5_5_29-pxc01 

make_sandbox 5.5.29-pxc -- --sandbox_port 4552 \
--sandbox_directory msb_5_5_29-pxc02 

make_sandbox 5.5.29-pxc -- --sandbox_port 4553 \
--sandbox_directory msb_5_5_29-pxc03 

But when I try to start a node this error happens:
130327 14:21:03 [Note] WSREP: wsrep_load(): loading provider library '/home/dvee
den/mysql/5.5.29-pxc/lib/libgalera_smm.so'
130327 14:21:03 [ERROR] WSREP: wsrep_load(): dlopen(): libssl.so.10: cannot open shared object file: No such file or directory
130327 14:21:03 [ERROR] WSREP: wsrep_load(/home/dveeden/mysql/5.5.29-pxc/lib/libgalera_smm.so) failed: Invalid argument (22). Reverting to no provider.


There is no libssl.so.10 on my Ubuntu 12.10 system, but there is a libssl.so.1.0.0.

The fix for this issue is:
cd ~/opt/mysql/5.5.29-pxc/lib/
ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 libssl.so.10
ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 libcrypto.so.10

The symlinks are created inside the library directory for Percona XtraDB Cluster, this way I don't need to tinker with the global library directories.