Install Mysql Database On Windows

  1. Download And Install Mysql Database On Windows 10
  2. Download And Install Mysql Database On Windows
  3. How To Download And Install Mysql Database On Windows 7
  4. How To Install Mysql Database On Windows Server 2012 R2

MySQL is a free, open-source, and readily available RDBMS for download. It is usually the first choice of most Web developers for learning SQL and database. Many large websites and hosting companies rely on using MySQL as their backend. Here we are outlining the simple steps to install MySQL on Windows 7.

Not only does it support multiple platforms but allows quick integration with a no. of programming languages like Java, C#, and Python. In our last tutorial, we’d laid down the steps to install MySQL on Ubuntu platform. If Linux is the other operating system you use, then it’s worth reading this tutorial to get a head-start on using MySQL.

Let’s now begin to explore the process to install MySQL on Windows 7 and also review the points to take care of post-installation.

MySQL on Windows MySQL provides you with a suite of tools for developing and managing MySQL-based business critical applications on Windows. They include: MySQL Installer for Windows. It now only takes 3 minutes from downloading the MySQL Installer to having a ready to use MySQL system on your machine!

Table of Content.

  • Download MySQL 5.7.
  • Install MySQL 5.7.
  • What to do After MySQL installation?
    • Using MySQL CLI.
    • Accessing MySQL Workbench.
    • How to Use MySQL Notifier?

Download And Install Mysql Database On Windows 10

How to Install MySQL on Windows 7

Download MySQL 5.7.

The latest and stable version of MySQL package is 5.7. It brings many security fixes and performance enhancements. And we recommend to use it for your deployments.

So the first step is to get the MySQL community installer for the Windows platform. The latest version of the MySQL community package is 5.7.17 which comprises the following components.

1. MySQL Connectors – A set of programmable modules for C, C++, C# APIs, and ODBC. It helps developing applications using MySQL database.
2. MySQL Workbench – A visual tool for DBA, Software Architects, and Web Developers. It features data modeling, SQL builder, server/user management, and database backup.
3. MySQL Notifier – A service that resides in the system’s tray which lets you watch over the status of any local or remote MySQL instance.
4. MySQL for Excel – An Excel Add-on to help users explore MySQL schemas, tables, views, and stored procedures.
5. MySQL Server – It is the relational database management system (RDBMS) which uses SQL for adding, accessing, and managing content in a database.

Other notable features which you’ll find in the MySQL package are as follows:

  • Pluggable storage engine support,
  • Database replication/partitioning services,
  • Stored procedures, triggers, views, and
  • Performance schema to monitor resource consumption.

Install MySQL 5.7.

After downloading the MySQL community edition, double-click the installer file to begin the installation process. It’ll launch the installer window.

Subsequently, follow the below steps. Take help from the snapshots attached. Make sure to edit or select the option, as shown in the picture.

Step-1.

Step-2.

Check Requirements.

Step-3.

Step-4.

Installation Status.

Step-5.

Step-6.

Edit Configuration.

Step-7.

Step-8.

Set As Windows Service.

Step-9.

Apply Server Configuration.

What to do After MySQL installation?

You’ve completed the MySQL installation on your Windows system. Now, you can perform the following tasks.

Install

Using MySQL CLI.

You can access the MySQL CLI from the <All Programs> section inside the Windows start menu. See the attached screenshot and open the 2nd CLI option as shown on the screen.

Mysql

MySQL CLI – Open MySQL Commandline

The CLI tool will ask for the root database password.

Entering the correct password will open up the MySQL command prompt. Here, you can run simple SQL commands, e.g., show databases.

MySQL CLI – Show Databases

Accessing MySQL Workbench.

In older MySQL versions, you’d to install the workbench separately. But now it’s already available with the standard MySQL installation.

To open the workbench, again go to the start menu, find MySQL program, and click to open it.

Install Mysql Database On Windows

Now, select the first MySQL instance shown in the above screen. It’ll ask you to provide the root database password. Enter the correct password to continue.

MySQL Workbench – Enter Root Password

After entering the password, you can access the MySQL query browser, run any query or perform any administration tasks. Check out the below screenshot.

How to Use MySQL Notifier?

As stated in the beginning, the notifier is an executable program that stays resident in the system’s tray. It brings you the control to manage the local/remote MySQL server instances.

You can check out from the attached snapshot of what the MySQL Notifier is capable of doing.

MySQL Notifier – Monitor MySQL Instances

Summary – Install MySQL on Windows 7 and Things to Do Next

The developers at MySQL have put up significant efforts in making the installer user-friendly. However, we also tried to optimize the steps to install MySQL on Windows 7.

Hopefully, this tutorial is helpful and addressing the common issues one might face during the MySQL installation. Also, don’t miss to read the below one as well.

Best,

TechBeamers

  • Learn MySQL
  • MySQL Useful Resources
  • Selected Reading

All downloads for MySQL are located at MySQL Downloads. Pick the version number of MySQL Community Server which is required along with the platform you will be running it on.

Installing MySQL on Linux/UNIX

The recommended way to install MySQL on a Linux system is via RPM. MySQL AB makes the following RPMs available for download on its website −

  • MySQL − The MySQL database server manages the databases and tables, controls user access and processes the SQL queries.

  • MySQL-client − MySQL client programs, which make it possible to connect to and interact with the server.

  • MySQL-devel − Libraries and header files that come in handy when compiling other programs that use MySQL.

  • MySQL-shared − Shared libraries for the MySQL client.

  • MySQL-bench − Benchmark and performance testing tools for the MySQL database server.

The MySQL RPMs listed here are all built on a SuSE Linux system, but they will usually work on other Linux variants with no difficulty.

Now, you will need to adhere to the steps given below, to proceed with the installation −

  • Login to the system using the root user.

  • Switch to the directory containing the RPMs.

  • Install the MySQL database server by executing the following command. Remember to replace the filename in italics with the file name of your RPM.

The above command takes care of installing the MySQL server, creating a user of MySQL, creating necessary configuration and starting the MySQL server automatically.

You can find all the MySQL related binaries in /usr/bin and /usr/sbin. All the tables and databases will be created in the /var/lib/mysql directory.

The following code box has an optional but recommended step to install the remaining RPMs in the same manner −

Installing MySQL on Windows

The default installation on any version of Windows is now much easier than it used to be, as MySQL now comes neatly packaged with an installer. Simply download the installer package, unzip it anywhere and run the setup.exe file.

The default installer setup.exe will walk you through the trivial process and by default will install everything under C:mysql.

Test the server by firing it up from the command prompt the first time. Go to the location of the mysqld server which is probably C:mysqlbin, and type −

NOTE − If you are on NT, then you will have to use mysqld-nt.exe instead of mysqld.exe

If all went well, you will see some messages about startup and InnoDB. If not, you may have a permissions issue. Make sure that the directory that holds your data is accessible to whatever user (probably MySQL) the database processes run under.

MySQL will not add itself to the start menu, and there is no particularly nice GUI way to stop the server either. Therefore, if you tend to start the server by double clicking the mysqld executable, you should remember to halt the process by hand by using mysqladmin, Task List, Task Manager, or other Windows-specific means.

Verifying MySQL Installation

After MySQL, has been successfully installed, the base tables have been initialized and the server has been started: you can verify that everything is working as it should be via some simple tests.

Use the mysqladmin Utility to Obtain Server Status

Use mysqladmin binary to check the server version. This binary would be available in /usr/bin on linux and in C:mysqlbin on windows.

It will produce the following result on Linux. It may vary depending on your installation −

If you do not get such a message, then there may be some problem in your installation and you would need some help to fix it.

Execute simple SQL commands using the MySQL Client

You can connect to your MySQL server through the MySQL client and by using the mysql command. At this moment, you do not need to give any password as by default it will be set as blank.

You can just use following command −

It should be rewarded with a mysql> prompt. Now, you are connected to the MySQL server and you can execute all the SQL commands at the mysql> prompt as follows −

Post-installation Steps

MySQL ships with a blank password for the root MySQL user. As soon as you have successfully installed the database and the client, you need to set a root password as given in the following code block −

Now to make a connection to your MySQL server, you would have to use the following command −

Download And Install Mysql Database On Windows

UNIX users will also want to put your MySQL directory in your PATH, so you won't have to keep typing out the full path everytime you want to use the command-line client.

How To Download And Install Mysql Database On Windows 7

For bash, it would be something like −

Running MySQL at Boot Time

If you want to run the MySQL server at boot time, then make sure you have the following entry in the /etc/rc.local file.

How To Install Mysql Database On Windows Server 2012 R2

Also,you should have the mysqld binary in the /etc/init.d/ directory.