Install MySQL on OSX

If you need a local instance of a mysql database for experiments and don’t really care about security as it’s not any production system here’s a quick way to install a mysql database on your OSX (tested with 10.9+)

  1. Download the latest OSX native package installation from the
    download page. It should be a dmg
  2. Install it as any other OSX application. It will create under
    /usr/local/mysql-x.y.z with a symlink to /usr/local/mysql the
    entire directory structure that will be needed by mysql. From now
    on I will refer as /usr/local/mysql directory.
  3. sudo rm -r /usr/local/mysql/data
  4. sudo mkdir /usr/local/mysql/data
  5. sudo chown -R <youruser> /usr/local/mysql/data
  6. /usr/local/mysql/scripts/mysql_install_db

If everything worked out fine you should be able to start it with

$ mysqld_safe &

to stop it

$ mysqladmin -u root shutdown

I’ve created a couple of aliases and exports in my ~/.profile to ease the tasks

 export PATH=$PATH:/usr/local/mysql/bin
 alias mysql-start="mysqld_safe &"
 alias mysql-stop="mysqladmin -u root shutdown"

Install Ubuntu (9.10) via Floppy


If you  are in hurry you can skip this section. 🙂

I had an old laptop with no capabilities of booting via USB and with a broken cd-rom, but a working floppy. So the main goal was to boot the computer from a floppy then tell the computer to boot via the ubuntu live installed on an USB key.

What you need.

  • A computer that can boot from cd and a USB port.
  • A computer with a running floppy drive.
  • An empty USB key (>=1Gb).
  • An empty Floppy (1.44Mb).

Create the bootable USB

Boot the pc with the desktop live cd-rom. Plug-in the empty usb key and make it bootable. From Applications menu there’s a voice like create USB key. Otherwise you can have a look at the Installation from USB stick on ubuntu official site.

Create the bootable floppy

I’ve tried many way to have a bootable floppy, that can recognize the USB key for booting (dsl, sbm, …) but the only one that had worked was: plop bootmanager. As advised me on the TiLUG Mailing List (Italian).

Download the latest version of plop boot manager (at the time of writing: 5.0.5), expand the obtained zip wherever you like and write the image on the floppy: dd if=plpbt.img of=/dev/fd0.


Now insert floppy, plug the usb key into the computer with broken cd-rom and boot it via floppy. When asked, select USB from the menu and that’s all folks!