How to Install MySQL on a Windows Web Server Running Apache

How to Install MySQL on a Windows Web Server Running Apache

Brief description

A beginner looking to practice how use Apache, PHP, and MySQL on Windows computer, can choose from any of the options:

  1. Use any pre-built like WAMP or XAMPP that has all components installed when deployed.
  2. Make your WAMP server by doing a manual installation of Apache, PHP, and

Target audience

This article is intended for beginners in web development who may want to practice installation on their Windows 10 PC.

In this tutorial, you will learn how to install Apache, PHP, and MySQL server on your Windows 10 PC. (For this demonstration we shall use Apache 2.4.29, MySQL 5.7.21 and PHP 7.2.3).

Special Note: most web pages and applications nowadays use databases, and MySQL is the most popular option. Make sure to get a web hosting plan that includes MySQL support. Visit HostAdvice’s Best MySQL Hosting Services for expert and user reviews on top MySQL hosting providers.

Overview

Apache is the web server software that commands a significant share in the world. Used in almost 67% of web servers globally, it boasts a large audience and many extensions. It is fast, reliable and secure in equal measure and the icing on the Cake, its open source hence free.

Some programs allow you to authenticate your users from a MySQL database and also write the logs to the MySQL database. Websites require MySQL to store and retrieve any data. Thus we shall install MySQL on an Apache server. We shall begin by installing Apache and PHP.

Apache will not run on Windows IIS running. Ensure that it is uninstalled or disabled. To disable Windows IIS;

Disable Windows IIS

Press the windows key and R. In the ensuing run window, type in appwiz.cpl

Press okay to open programs and features window.

At the left-hand side, click on turn windows features on or off.

Uncheck Internet Information Services.

Installing Apache

Download Apache from apache http server and double click on setup to start the installation wizard.

Accept the agreement then click next.

Add localhost to both network domain and server name. Type the administrator email address. Select “for All ….” to run Apache as a windows service.

Choose Typical as the setup type.

Select the destination and choose a suitable folder.

Click Install.

That is it. To test your installation, open a browser and type http://localhost.

Apache setup is complete. You can now set up your system to install PHP packages.

Install PHP

Download PHP from their website and unzip under C:php72.

Rename the PHP-ini-development to php.ini.

Again, open the file >c:Apache24confhttpd.conf and append it with lines:

Restart Apache services. You can now access your PHP page from the default Apache document root.

Install MySQL

You can finally install MySQL. Download the installer and double-click to begin the installation.

Accept the license and click next.

Select Server only and click on next.

Click on the execute to Install Visual Studio 2013

Accept the license terms and click Install

Click Next.

Click Execute to MySQL Server.

On the Config Type; choose Server Machine. Leave the rest as default.

Type a root password and confirm it then click next.

Click on Next and leave the settings as default.

Click Next. Leave the rest as default.

Click Next. MySQL database ready to use.

Conclusion

With MySQL on apache, you have data security. MySQL is globally renowned for being a very secure and reliable database management system. Another thing is its high performance. It features a storage engine framework that assists system administrators. With MySQL being open source, it has round the clock support whether from its official site or forums made up of enthusiast and developers. MySQL also supports load balancing, so that means your database is safe from DOS attacks.

Check out the top 3 Windows hosting services:

Ultahost
$2.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8
Kamatera
$4.00 /mo
Starting price
Visit Kamatera
Rating based on expert review
  • User Friendly
    3.5
  • Support
    3.0
  • Features
    3.9
  • Reliability
    4.0
  • Pricing
    4.3
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3

How To Install and Configure MySQL for PHP Applications on Windows IIS 7

When hosting PHP apps on IIS 7 it’s highly recommended you use the Miscrosoft
4 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install AMPPS on Ubuntu 18.04

AMPPS is a solution stack for Apache, MYSQL, MongoDB, PHP, Perl and Python that
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to Install OpenCart on an Ubuntu 18.04 Server or VPS with Apache, MariaDB and PHP 7

In this how-to, you’ll learn how to install OpenCart, an open source shopping ca
3 min read
Angela Olaru
Angela Olaru
Senior Writer & Hosting Expert

How To Install Apache, MySQL & PHP on an Ubuntu 18.04 VPS or Dedicated Server

This article shows users how to setup PHP, Apache web server and MySQL database
4 min read
Idan Cohen
Idan Cohen
Marketing Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top