3.1. Checking the MySQL Installation

You might or might not need to install MySQL. In many cases, MySQL is already installed. For instance, most recent Linux and Mac distributions automatically install MySQL. MySQL isn't provided with the Windows operating system.

Before installing MySQL, be sure that you actually need to install it. It might already be running on your computer, or it might be installed but not running. For instance, many Linux distributions automatically install MySQL. Here's how to check whether MySQL is currently running:

  • Linux/Unix/Mac: At the command line, type the following:

    ps –ax

    The output should be a list of programs. Some operating systems (usually flavors of Unix) have different options for the ps command. If the preceding doesn't produce a list of programs that are running, type man ps to see which options you need to use.

    In the list of programs that appears, look for one called mysqld. If you find it, MySQL is running.

  • Windows: If MySQL is running, it will be running as a service. To check this, choose StartControl PanelAdministrative ToolsServices and scroll ...

Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.