Archive for the ‘Mac’ Category

Installing MySQLdb on MacOS Lion

Ноябрь 10th, 2011

I ran into an issue installing the MySQLdb module.

>>> import MySQLdb
/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/_mysql.pyc, but /Users/jhaddad/Downloads/MySQL-python-1.2.3 is being added to sys.path
Traceback (most recent call last):
File ““, line 1, in
File “MySQLdb/__init__.py”, line 19, in
import _mysql
File “build/bdist.macosx-10.7-intel/egg/_mysql.py”, line 7, in
File “build/bdist.macosx-10.7-intel/egg/_mysql.py”, line 6, in __bootstrap__
ImportError: dlopen(/var/root/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: /var/root/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so
Reason: image not found

I fixed it by doing the following:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql

I’m not sure if it matters, but I’ve got MySQL 5.5 installed.

Found the answer here – but it wasn’t the top voted one. If this is useful, vote Chris up.

http://stackoverflow.com/questions/4730787/python-import-mysqldb-error-mac-10-6


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.35 GA Available

Сентябрь 23rd, 2011

The MySQL Developer Tools team is proud to announce the next release of it’s flagship product, MySQL Workbench, version 5.2.35. This is the next maintenance release containing 29 bug fixes as well as new feature additions. We also updated the supported platforms to include most recent editions of Fedora and Ubuntu Linux.

MySQL Workbench 5.2.35 now supports the Native Windows Authentication Method – available in the commercial MySQL server product – and the creation of user accounts utilizing this new authentication method.

For the PHP developers out there, Workbench now also comes with a new set of plugins to turn SQL Queries into PHP code to be put right into your scripts.

A big “Thank You” again to everyone for the large amount of feedback and ideas we have received on how to further improve and extend MySQL Workbench. We are continuously working on improving the functionality and stability of MySQL Workbench – please keep sending us your ideas!

MySQL Workbench 5.2 GA

  • Data Modeling
  • Query (replaces the old MySQL Query Browser)
  • Administration (replaces the old MySQL Administrator)

Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.

http://dev.mysql.com/downloads/workbench/

Workbench Documentation can be found here.

http://dev.mysql.com/doc/workbench/en/index.html

In addition to the new Query/SQL Development and Administration modules, version 5.2 features improved stability and performance – especially in Windows, where OpenGL support has been enhanced and the UI was optimized to offer better responsiveness. This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in

http://wb.mysql.com/workbench/doc/

For a detailed list of resolved issues, see the change log.

http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.

Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.31 GA Available

Декабрь 9th, 2010

We’re proud to announce the next release of MySQL Workbench, version 5.2.31. This is a maintenance release focusing on general product improvement and usability.

We managed to close 97 bugs for this release.

MySQL Workbench:  Remote Administration on Windows – Support for Windows “Remote” Management within the New Server Instance Wizard and Manage Server Instance Form. This works for servers on the same domain (or trusted) – ie typical Windows LAN environments.  We expect Windows users to prefer this “native” way to do remote admin on Windows.  SSH remote admin has been available for some time on Windows, Mac OS, and Linux.

MySQL Workbench:  Utilities Plugin – Starts a shell that contains a set of python scripts that perform basic tasks such as copying, exporting, and importing databases, finding database objects or processes, cloning servers and cloning users.

MySQL Workbench: Scripting shell – Provides python plugin scripters with break points, start, step, pause, and added debug information.

As always, we want to thank everyone for the great feedback we have received. This helps us to continuously improve the functionality and stability of MySQL Workbench – we appreciate all your ideas for improving MySQL Workbench.  Please keep sending us your ideas!
MySQL Workbench 5.2 GA

  • Data Modeling
  • Query (replaces the old MySQL Query Browser)
  • Administration (replaces the old MySQL Administrator)

Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.

http://dev.mysql.com/downloads/workbench/

To get started quickly, please take a look at this short tutorial.

MySQL Workbench 5.2 RC Tutorial

http://wb.mysql.com/?p=406

Workbench Documentation can be found here.

http://dev.mysql.com/doc/workbench/en/index.html

In addition to the new Query/SQL Development and Administration modules, version 5.2 features improved stability and performance – especially in Windows, where OpenGL support has been enhanced and the UI was optimized to offer better responsiveness.
This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in

http://wb.mysql.com/workbench/doc/

For a detailed list of resolved issues, see the change log.

http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.

Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.30 GA Available

Ноябрь 20th, 2010

We’re proud to announce the next release of MySQL Workbench, version 5.2.30. This is a maintenance release focusing on general product improvement and usability. In addition to that, we have added a small set of Text-Formatting-Plugins to the SQL Editor to help format/structure your SQL Queries.

As always, we want to thank everyone for the great feedback we have received. This helps us to continuously improve the functionality and stability of MySQL Workbench – we appreciate all your ideas for improving MySQL Workbench.  Please keep sending us your ideas!

About the Query-Formatter

In the Edit->Format menu of Workbench’s SQL Editor you will see a set of functions that assist in reformatting your SQL Queries, for example “Beautify Query”, “UPCASE Keywords”, etc.

MySQL Workbench 5.2 GA

  • Data Modeling
  • Query (replaces the old MySQL Query Browser)
  • Administration (replaces the old MySQL Administrator)

Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.

http://dev.mysql.com/downloads/workbench/

To get started quickly, please take a look at this short tutorial.

MySQL Workbench 5.2 RC Tutorial

http://wb.mysql.com/?p=406

Workbench Documentation can be found here.

http://dev.mysql.com/doc/workbench/en/index.html

In addition to the new Query/SQL Development and Administration modules, version 5.2 features improved stability and performance – especially in Windows, where OpenGL support has been enhanced and the UI was optimized to offer better responsiveness.
This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in

http://wb.mysql.com/workbench/doc/

For a detailed list of resolved issues, see the change log.

http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.

Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.29 GA Available

Октябрь 12th, 2010

We’re proud to announce the next release of MySQL Workbench, version 5.2.29. This maintenance release focuses on general product improvement and usability.

As always, we want to thank everyone for the great feedback we have received. This helps us to continuously improve and extend the functionality and stability of MySQL Workbench – please keep up on approaching us with any ideas to develop our product even further.

New Workbench 5.2.29 Preference/Feature

Say you have been working on a model for hours in Workbench, and you haven’t saved in the last 90 minutes, suddenly the power goes out (or some other force majeure). Now with 5.2.29, if Workbench unexpectedly quits during modeling, the model you were working on will be restored to the last auto-saved version the next time you open that model.
As always, please remember to save and version your models regularly.
Also – you can change the value of Auto-Save Model Interval from its 5 minutes – go to Edit->Preferences and change within the General tab.

MySQL Workbench 5.2 GA

  • Data Modeling
  • Query (replaces the old MySQL Query Browser)
  • Administration (replaces the old MySQL Administrator)

Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.

http://dev.mysql.com/downloads/workbench/

To get started quickly, please take a look at this short tutorial.

MySQL Workbench 5.2 RC Tutorial

http://wb.mysql.com/?p=406

Workbench Documentation can be found here.

http://dev.mysql.com/doc/workbench/en/index.html

In addition to the new Query/SQL Development and Administration modules, version 5.2 features improved stability and performance – especially in Windows, where OpenGL support has been enhanced and the UI was optimized to offer better responsiveness.
This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in

http://wb.mysql.com/workbench/doc/

For a detailed list of resolved issues, see the change log.

http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.

Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.28 GA Available

Сентябрь 19th, 2010

We’re proud to announce the next release of MySQL Workbench, version 5.2.28. This maintenance release features improvements to the Workbench scripting Shell as well as various fixes.

Enhancements to the Workbench 5.2.28 Scripting Shell makes development and usage of Workbench Scripts and Plug-ins easier by

  • Providing a new workbench shell scripting file browser
  • Allowing users to more easily create/edit/save/execute Workbench python and lua scripts
  • Including Handy Workbench “Scripting” snippets that can easily be executed or copied.
  • Adding a new script results output panel

For more on Workbench Scripting and Plug-in development see

http://wb.mysql.com/?page_id=664

As always, we want to thank everyone for the great feedback we have received. This helps us to continuously improve and extend the functionality and stability of MySQL Workbench – please keep up on approaching us with any ideas to develop our product even further.

MySQL Workbench 5.2 GA

  • Data Modeling
  • Query (replaces the old MySQL Query Browser)
  • Administration (replaces the old MySQL Administrator)

Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.

http://dev.mysql.com/downloads/workbench/

To get started quickly, please take a look at this short tutorial.

MySQL Workbench 5.2 RC Tutorial

http://wb.mysql.com/?p=406

Workbench Documentation can be found here.

http://dev.mysql.com/doc/workbench/en/index.html

In addition to the new Query/SQL Development and Administration modules, version 5.2 features improved stability and performance – especially in Windows, where OpenGL support has been enhanced and the UI was optimized to offer better responsiveness.
This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in

http://wb.mysql.com/workbench/doc/

For a detailed list of resolved issues, see the change log.

http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.

Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench onirc.freenode.net.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.27 GA Available

Сентябрь 1st, 2010

We’re proud to announce the next release of MySQL Workbench, version 5.2.27. This is the second maintenance release for 5.2 GA (Generally Available). This maintenance release does not introduce any new features, but focuses on general product improvement and usability.  We hope you will make MySQL Workbench your preferred tool for Design, Development, and Administration of your MySQL database applications.

As always, we want to thank everyone for the great feedback we have received. This helps us to continuously improve and extend the functionality and stability of MySQL Workbench – please keep up on approaching us with any ideas to develop our product even further.

MySQL Workbench 5.2 GA

  • Data Modeling
  • Query (replaces the old MySQL Query Browser)
  • Administration (replaces the old MySQL Administrator)

Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.

http://dev.mysql.com/downloads/workbench/

To get started quickly, please take a look at this short tutorial.

MySQL Workbench 5.2 RC Tutorial

http://wb.mysql.com/?p=406

Workbench Documentation can be found here.

http://dev.mysql.com/doc/workbench/en/index.html

In addition to the new Query/SQL Development and Administration modules, version 5.2 features improved stability and performance – especially in Windows, where OpenGL support has been enhanced and the UI was optimized to offer better responsiveness.
This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in

http://wb.mysql.com/workbench/doc/

For a detailed list of resolved issues, see the change log.

http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.

Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.26 GA Available

Август 7th, 2010

We’re happy to announce the release of MySQL Workbench 5.2.26. This is the first maintenance release for 5.2 GA (Generally Available). We have fixed a number of bugs and made some improvements under the hood. We hope you will make MySQL Workbench your preferred tool for Design, Development, and Administration of your MySQL database applications.

We want to thank everyone for the great feedback we have received. This helps us to continuously improve and extend the functionality and stability of MySQL Workbench – please keep up on approaching us with any ideas to develop our product even further.

MySQL Workbench 5.2 GA

  • Data Modeling
  • Query (replaces the old MySQL Query
  • Administration (replaces the old MySQL Administrator)

Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.

http://dev.mysql.com/downloads/workbench/

To get started quickly, please take a look at this short tutorial.

MySQL Workbench 5.2 RC Tutorial

Workbench Documentation can be found here.

http://dev.mysql.com/doc/workbench/en/index.html

In addition to the new Query/SQL Development and Administration modules, version 5.2 features improved stability and performance – especially in Windows, where OpenGL support has been enhanced and the UI was optimized to offer better responsiveness.
This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in

http://wb.mysql.com/workbench/doc/

For a detailed list of resolved issues, see the change log.

http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.

Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Workbench 5.2.22 RC 2 Available

Июнь 3rd, 2010

Dear MySQL Users,

We’re happy to announce the second Release Candidate (RC) of MySQL Workbench.
Version 5.2.22 includes fixes for 76 bugs.

In case you didn’t know – MySQL Workbench is a modular product and is fully pluggable and scriptable. If you want to write a plug-in for Workbench 5.2, then stay tuned as we will be updating the documentation in the next week with all the details and examples you need on how to write your own plug-ins.

Plug-ins are great for extending or adding to workbench or for automating repetitive tasks. You can do things like adding to menus, exporting your Workbench models custom tailored for your coding environment, adding your own forms, and more. Python is our preferred scripting language but for simple scripts the Lua language can be used as well.

The first plug-in we added is called MySQL Doc Library. It can be used to read the MySQL Documentation offline and features many convenient features such as full text search. Currently, only the MySQL Workbench manual is included, but material and features will be added over time.

MySQL Workbench 5.2 RC provides:

  1. Data Modeling
  2. Query (upgrade from MySQL Query Browser)
  3. Admin (upgrade from MySQL Administrator)

if you are a current user of MySQL Query Browser or MySQL Administrator, we look forward to your feedback on all the new capabilities we are delivering in a single unified MySQL Workbench

As always, you will find binaries for the various platforms on our download pages.

Please get your copy from our Download

http://dev.mysql.com/downloads/workbench/

To get started quickly, please take a look at this short tutorial.

MySQL Workbench 5.2 RC Tutorial

http://wb.mysql.com/?p=406

Please be aware that this release is still a in-development version – so please don’t use it on your production servers! Also note, MySQL Workbench files saved with version 5.2 cannot be opened with previous versions of our program.

The files for several platforms have been pushed to our main server and should be available on our mirrors.

Blog postings and general information – including build instructions for Linux – can be found on our Workbench Developer Central site.

Workbench Developer Central

http://wb.mysql.com

Workbench Documentation and details on changes between releases can be found on these pages

http://dev.mysql.com/doc/workbench/en/index.html
http://dev.mysql.com/doc/workbench/en/wb-change-history.html

If you need any additional info or help please get in touch with us.
Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.

Again, thank you for trying out the Workbench development versions, we look forward to your feedback and bug reports.

- The MySQL Workbench Team


PlanetMySQL Voting: Vote UP / Vote DOWN

On Writing a Book, Pt. 4 – The Tools (II)

Май 17th, 2010

This is part four of an ongoing series about my experiences while writing the MySQL Admin Cookbook for Packt Publishing. All previous parts can be found under the mysql-admin-cookbook label.

This part will be about more software used in the process of writing the book. The last episode covered writing tools, file/version management and backups. What's up now is graphics programs, virtualization and PDF handling.

Outlining

For outlining and structuring thoughts I like mind-maps. I know they are not for everyone, but if you like them and do not want to spend a lot of money on MindManager, have a look at FreeMind. It is a free, open source, Java based mind mapping application with a large set of features and a really nice UI. In fact, I am using it right now to structure the writing of this series of blog posts. It comes in readily installable versions for Windows, Mac OS X and Linux, which makes it really a good fit if you regularly switch platforms and want to be able to add a thought or two to an existing map without having to dual-boot or fire up a virtual machine.

Graphics and Illustrations

As with any technology, some things in database land are much easier to show as a diagram or schematic drawing than explaining them verbosely in text. Not to forget the occasional – well, the regular – screenshot to show GUIs or console printouts.

Screenshots

As a matter of fact in the first drafts of most chapters Udo and I had a lot of textual presentations of query results and plain text output from the mysql command line client, but the publishing company wanted more screenshots instead to make the book appear less text heavy. There have been mixed reactions to this, but generally I think less would have been more. Several of the screenshots merely show console windows which are not always good to read due to scaling and anti-aliasing.

To take screenshots, Mac OS X is pretty well suited without any additional tools. Even though there are some nice programs that offer advanced features like Layers which can automatically create a PSD file with one layer per open window, usually screenshots were taken of a single Terminal.app window or specific dialogs. For that the built-in features were completely sufficient:

  1. ⇧+⌘+3 produces a snapshot of the whole screen
  2. ⇧+⌘+4 produces a crosshair that you can drag over a specific area of your screen
  3. ⇧+⌘+4 followed by the space bar turns the crosshair into a camera to snapshot a single window

The only adjustment needed was to disable the drop shadow that is otherwise put behind the windows in the screenshot files by default:

defaults write com.apple.screencapture disable-shadow -bool true

That change gets effective after logging out and back in again or by killing the SystemUIServer process.

The screenshots are placed on the desktop by default. Depending on the OS X release the filename and format may differ. For the book we wanted PNG files, because JPGs would have caused compression artifacts. PNG is the default in Mac OS X 10.6 Snow Leopard. Generally this command allows you to change the format of screenshot files:

defaults write com.apple.screencapture type png

Instead of png you can also choose from tiff, gif, jpg, pdf, if I am not mistaken.

For Windows I used is a handy little tool called Screenshot Pilot which has a slightly “nostalgic” GUI style, but it works really well. It is far more pleasant to use than the otherwise necessary Windows style screenshot taking by hitting Alt-PrtScr to copy the current Window to the clipboard and then paste it into mspaint.exe and save it as a file.

Illustrations

Very early in the process we asked Packt about how to go about illustrations. They told us that anything would be fine that worked for us, because they had professional illustrators who would re-draw anything we sent them to give the book a uniform style. For example they would accept drawing made with any of the Office tools, bitmap graphics or just scans of hand-drawn sketches. I was very relieved when I heard this, because if there's one thing that eats up time even more quickly than text formatting it certainly is graphics work. I think of myself as nothing close to an artist, so knowing that someone else with probably lots of experience and routine would take care of this was very comforting and would relieve us of the necessity to find a set of good graphics tools.

Or so we thought at the time... To give you an idea, this is one of the sketches I sent along with a chapter of text:

SSH Tunneling Schematics - Sketch

While certainly no masterpiece I think the idea is brought across well enough for someone to redraw this with a little style. I scribbled together a few of these and sent them off in good faith.

Later in the process, this is what I got back for the sketch above:

SSH Tunneling Schematics - 1

Frankly, I was very much disappointed and certainly did I not want graphics of this style and quality to go into the book. Just look at the tunnel entrance and exit symbols… So in the end I decided to take care of the graphics myself. I fooled around a little with OpenOffice's drawing tool but did not manage to create anything that I even remotely liked. Fortunately a friend of mine owns a copy of OmniGraffle, a professional vector based diagramming tool for the Mac, and he let me spend some time on his machine remotely. With this I managed to create new versions of the illustrations in a style that I liked and with a little more attention to detail. This is my version of the same idea:

SSH Tunneling Schematics - 2

Making these took quite a lot of time. Once finished with the bulk of the work I sent it off to the publisher in EPS format, because I hoped that would be the easiest way of making sure they had the best possible quality to work with without requiring them to organize a Mac. Turns out the EPS is not as portable as I thought and had hoped. There were lots of troubles with line and arrow styles, transparencies etc. In the end I had to download a trial version of Corel Draw for Windows, because that's what Packt's graphics people use.

With trial and error I managed to get the illustrations to Corel Format with the correct fonts and no strange rasterizing artifacts for partially transparent areas. All in all, had I known I would have to take care of this myself from the beginning, I would have asked for at least one more month in the schedule and prepared them along the way. The same goes for the very few charts included in the book. I made these with a trial version of OmniGraphSketcher, also from OmniGroup. The idea behind this tool is to actually draw diagrams, instead of having them generated by a spreadsheet tool from pure numbers. While I generally like the idea, the tool is still lacking in my opinion. For example getting the X- and Y-scales right was more complicated than I would have thought. Anyway, I will keep an eye on the program - it surely has the potential to become a valuable tool and I will most certainly check it out again if/when the need arises.

A few more words on Corel Draw: I have no option but to rant about it! The last version I remember to be really good was Corel Draw 5, about a millennium ago or so. After that I had a look at Corel Draw 7 and did not like it at all. In my opinion it has suffered form the same feature-creep that most applications that were once lean, fast and powerful, getting bigger and especially buggier all the time (Firefox, Nero anyone?). I am glad I have no need to work with this software on a regular basis. From real crashes - which I saw quite a few of - to annoying user experience problems; this is not a program you would enjoy to work with. The stupidest thing in my opinion was that for virtually any file operation the open or save dialogs would open in my home directory, instead of remembering which directory I had last used. An estimated three hours of my lifetime could have been saved, had I not had to spend them navigating to the right path time and again. Also what is it the myriad of file format versions? As you save a file you have to decide what version (7, 8, 9, 10, 11, 12) you would like to use. Of course they are all called ".CDR", and the program does not remember what you chose for the last file... Better make sure to include the format version in the filename, because once on the disk you have to easy way to tell which is which!

Test setups / Virtual Machines

As it is easy to imagine, for a database cookbook lots of experiments and trying out stuff is required in order to make sure that everything you claim actually works. Anyone who kept reading up to this point is probably technical enough to understand that no matter how well you plan and how carefully you write down any sort of script, source code sample or the like, it will not work unless you copy and paste it from the actual command line window or source code editor. There just is no other way. And also it is (almost) guaranteed that you will break any code by making "one last beautifying change" in the word processor; be it a missing semicolon, a space introduced into a regular expression or a capitalization change, something will go wrong!

The only chance to make sure your readers are not too likely to find a bug in your scripts or command lines is to try them all - each and every one of them. Of course, some of them by design make permanent changes to the test setup, so if anything goes wrong and you cannot just take a screenshot and put it into the manuscript you might be in for varying amounts of resetting the machine and trying again. More than once I made a simple mistake in that, too and ended up with an ever so slight difference in the test setup, messing up the test again. In that light, one wonders why any functioning production systems exist in the first place...

Fortunately this is not 1995 anymore and there are very capable virtualization solutions available for reasonable prices to ease the pain with repeated tests and different setups.

As Mac OS X is not the primary platform most MySQL administrators use - neither as a client, nor as a server - I need a way to test with different versions and setups of Windows and Linux. One way would have been to use bootcamp to dual-boot into Windows, but that would have caused unacceptable roundtrip times. Because performance was rarely an issue, I decided to buy VMWare Fusion 3. Though not very cheap it certainly is a product worth its money. Here you can see my Virtual Machine Library - some of the test VMs have been deleted since the book was finished - but you can still see the Ubuntu, Vista and Windows 7 VMs I primarily used to take screenshots on.

VMWare Library

Apart from being able to run different operating systems and MySQL versions, the killer feature for me was snapshots. Basically they allow you to clone a virtual machine and all its state into one or more named copies and reverting back to these "save-games" at a later time, discarding any changes that happened in the meantime. Though not particularly suited for long term operations - performance is degraded quite a bit - they are ideal for what I call "destructive" tests: Those that actually modify system state, like configuration files, database contents, software installations etc. For every VM I would first set up a well-known "good state" and take a snapshot of that. If in the course of writing a recipe I needed to make several attempts to get everything just right I could mess everything up with no worries and go right back to the beginning, without any risk of accidentally missing something important.

VMware Snapshots

If you regularly have to do any sort of software testing you will appreciate the benefits virtualization immediately. The fact that I chose VMware is not too important. As it is often with software, personal preference plays a huge role. Udo got a good deal on Parallels Desktop which is another commercial virtualization solution for the Mac. However you could just as well go with the free VirtualBox from Oracle, available for Windows, Linux and the Mac. They all offer very similar feature sets and would all have been equally suited for the tasks I performed.

PDF Tools

In the later stages of production annotated PDF documents superseded the previously used OpenOffice and Word document files. The reasons for and problems with that will be focused on in a later installment of this series.

Mac OS X incorporates very strong PDF handling facilities right in the operating system's core. Much of the Mac's graphics are based on PDF internally, so it is not too surprising to find advanced PDF handling features in the built-in "Preview.app". Out of the box any Mac can open PDF documents, inspect their meta-data and also create new PDFs from any application without the need for special PDF printer apps or the like. Before the book writing project I had never even bothered to install the Adobe Reader - I just did not have any use for it. Considering the fact that compared to Preview.app it takes ages to load and is a never-ending source of security problems I had no intention of changing that.

But then Packt started to send us PDF versions of the first formatted and laid out chapters, complete with annotations and comments. I blogged about a rather unpleasant episode regarding Preview.app's shortcomings earlier.

OS X Preview displaying a PDF with annotations

I won't repeat everything here, but suffice it to say that you should not trust it to show all the annotations and comments a document contains!

So I needed to download and install Adobe Reader to make sure I could at least see all annotations and meta-information embedded in the PDFs from the publisher. I have not checked again since, but when I last downloaded the installer from their website it was not the latest version. In order to keep your system (reasonably) secure against the many Adobe Reader based exploits circulating the net, make sure to manually run the updater again and again until it tells you there are no more updates left! If there had been updates like this in 1995, I am sure they would have been implemented like this...

The same goes for Acrobat Professional which in the further course of getting the book done was needed as well - again, details will follow later. For reasons beyond logic there is no trial version on Adobe's page for Acrobat Pro as a standalone application on the Mac - only for Windows. As a Mac user you need to download the full CS4 suite to try it... Fortunately I did not have to jump through these hoops, because a version 8 DVD was included in the software bundle with Fujitsu's ScanSnap. That one, too, had to be updated in what felt like 100 individual runs of the Adobe Updater.

While being considerably slower than the Preview.app accompanying Mac OS X, Acrobat and Adobe Reader were much better at handling document commenting, revising and especially comparing! Yes, it is possible to compare two PDFs and have Acrobat highlight changes between the two - a feature that became indispensable in the later project phases:

Acrobat Comparison

With that I will conclude this second part of the tool descriptions. I have probably forgotten one or two little utilities that came in handy, but these were the companions that accompanied me along the way constantly. In the upcoming episodes I will refer to them as needed, but you should have a general idea on what kinds of tools it took to complete the project. Be advised though that once my little saga here is complete you will find that quite a few of them shouldn't have been necessary for me to have, but that is for another time.

The next part will resume the more chronological style of describing my experiences. Stay tuned :)


PlanetMySQL Voting: Vote UP / Vote DOWN