Sunday, September 30, 2012

MySQL Sandbox updated with minimal support for MySQL 5.6.7

One of the surprises of MySQL 5.6 was that the table was missing. How did I realize it? Because make_sandbox, the basic installation brick of MySQL Sandbox failed to complete. What happened is that MySQL Sandbox, before claiming success, checks if some key elements are available. One of such elements is the 'host' table, which, unbeknown to me, had been deprecated, and was eventually removed in yesterday's release. As a result, installation of MySQL 5.6.7 fails.

The fix is quite easy, and I released it today. It is available in MySQL Sandbox 3.0.26, which you can get from Launchpad and CPAN.

This fix is minimal because it barely allows you to install MySQL 5.6. However, there are additional issues that need to be addressed, most notably the excessive chattiness. While this release was necessary to make operations possible, I will need to iron out the unfriendliness introduced by MySQL 5.6 to allow sandboxing to continue. Stay tuned: more will come.


John Russell said...

Giuseppe, thanks for such quick turnaround.

My attempt at installing a 5.6.7 instance still fails. With the earlier Sandbox version, it would give the "table host not installed" error, then "./start" would succeed, but "./use" would fail with an "access denied" error. With the new Sandbox, I still get "table host not installed", and now "./start" fails (draws a long line of progress dots, then errors out with "sandbox server not started yet").

The error log contains some troublesome lines:

121001 9:38:26 [Note] Server hostname (bind-address): '*'; port: 49567
121001 9:38:26 [Note] IPv6 is available.
121001 9:38:26 [Note] - '::' resolves to '::';
121001 9:38:26 [Note] Server socket created on IP: '::'.
121001 9:38:26 [ERROR] Can't start server : Bind on unix socket: No such file or directory
121001 9:38:26 [ERROR] Do you already have another mysqld server running on socket: _GLOBALTMPDIR_/mysql_sandbox49567.sock ?
121001 9:38:26 [ERROR] Aborting

121001 9:38:26 [Note] Binlog end
121001 9:38:26 [Note] Shutting down plugin 'partition'
...other shutdown messages...
121001 09:41:38 mysqld_safe mysqld from pid file /Users/cirrus/sandboxes/567/data/ ended

It looks like the .cnf file is getting set up as:

socket = _GLOBALTMPDIR_/mysql_sandbox49567.sock

under both [client] and [mysqld].

If I edit those paths in the .cnf file to refer to /tmp as before, now "./start" works, the error log shows the server is ready for connections, but "./use" still fails with:

ERROR 1045 (28000): Access denied for user 'msandbox'@'localhost' (using password: YES)

The make_sandbox command I'm using (on OS X) is:

make_sandbox /Users/cirrus/sandbox-setup/mysql-5.6.7-rc-osx10.7-x86_64.tar.gz --force --sandbox_port=49567 --sandbox_directory=567

which follows the same pattern as earlier successful commands, with a different port and directory.

make_sandbox --version reports 3.0.26, but the persistence of the "table host not installed" message makes me wonder if some other older module is still hanging around. (Maybe I installed as a regular use one time and as root another time.) How could I check that?

Giuseppe Maxia said...

please post requests in the Sandbox site, not here.

If you are installing on a recent Mac, be aware that previous installations of the same module may go to different directories, as the default version of Perl has changed. I have had this problem before. Search for "*make*sandbox*" in your $PATH, remove every occurrence, and then reinstall.

Vote on Planet MySQL