Setting up MySQL on Cygwin

MySQL is a well known database program, which you will need if you plan on setting up a locally hosted site for web development, or similar. MariaDB, a fork of the project which came into existence after Oracle purchased MySQL, is not yet available on Cygwin or CygwinPorts, but watch this space.

MySQL on Cygwin

You need to run the Cygwin Setup program, and install:

  • mysql
  • mysqld

Once they and their dependencies have been installed, you can begin configuring MySQL at the command line:

In case you’re not aware, you should follow the setup program’s suggestions and remove the test database, anonymous users, etc. Once this is done, you can launch MySQL by running mysqld_safe, and stop it with mysqladmin shutdown, though this can take up to a minute to take effect.

And that’s it. MySQL on Cygwin is hardly server material, but it is good for practicing if you don’t want to set up a VM for the purpose.