Monday, December 7, 2009

Setting up MySQL on Windows 7 for temporary use

  1. Download MySQL. You want the MSI Installer for the current version.
  2. Run the installer. Stick to all of the defaults. Let it figure out what to install, where to install it, let it set up the installation for you, etc. The one thing you want to edit (towards the end) is...
  3. Don't let it install mysqld as a service. We can start and stop it manually. Leave the PATH stuff unchecked, it won't work on Windows 7 anyways.
  4. Write a batch file to start the MySQL server. The exe we'll be using is mysqld. --console gives us echoes of what's going on in mysqld. By default it runs silently. This is my batch file:
    cd C:/Program Files/MySQL/MySQL Server 5.1/bin/
    mysqld --console
  5. Start the server.
  6. Start the MySQL Command Line Client from the Start Menu. This is some kind of magical shortcut that doesn't actually point to an exe. Weird...
  7. Leave the server's cmd window open while you're working. When you're ready to close it, focus the window and press Ctrl + C.

No comments:

Post a Comment