How to setup WordPress locally: Installing MySQL

Published on

Last Updated on

Estimated Reading Time: 1 min

Installing MySQL on Windows

  • Go to the MySQL Website and download the installer file from the windows section.
  • Run the installer.
  • Choose the Developer Default and click on Execute.
  • On the MySQL Server Configuration Dialog, enter the password for the root/administrator access.

Testing MySQL on Windows

  • Run the command prompt as Administrator.
  • Navigate to the bin directory in the MySQL server installation directory.
  • Type mysql -u root -p.
  • At the prompt, enter the password.
  • MySQL starts, and you should see the MySQL prompt.
  • Type quit to exit.

Activating MySQL for PHP

  • Open the php.ini file for editing
  • Remove the semicolon from the line ;extension_dir ="ext"
    • If the line does not exist, add the line.
  • Change ext to point to the ext folder in the PHP install directory.
  • Remove the semicolon from the line ;extension=php_mysqli.dll
    • If the line does not exist, add the line.
  • Restart the APACHE server.