Home > Database > Mysql Tutorial > body text

How to install mysql (tutorial)

PHPz
Release: 2023-04-20 10:59:23
Original
5833 people have browsed it

MySQL is a popular relational database management system that runs on a variety of operating systems, including Windows, MacOS, Linux, and more. This article will introduce readers to the MySQL installation version tutorial, allowing you to easily install and set up MySQL.

Step 1: Download the MySQL installation version

First, you need to download the MySQL installation version from the official website https://www.mysql.com/downloads/. Select the version suitable for your system on the page. Below is the download interface for the Windows installation version.

Step 2: Install MySQL

After the download is complete, you can open the installation wizard by double-clicking the installer, select the installation location you want in the installation wizard and complete the installation. Here is an installation method on Windows:

  1. Double-click to run the downloaded mysql-installer-community-xxxxxx.msi file to open the MySQL installation wizard;
  2. In In the selection operation interface, you can choose to install MySQL services, MySQL tools, visualization tools, etc. Here, we choose to install the MySQL service and MySQL tools.

  3. Click to continue. Next, you will be asked to choose the data installation type. There are two types: standard and detailed. We choose the standard type;

  4. Then click " Execute" and wait for the installation to complete.

Step 3: Start the MySQL service

After the installation is completed, starting the MySQL service is a very important step. The operation method is as follows:

  1. Open the "Services" window of Windows, find the "MySQL80" service in it, and start it;
  2. You can enter the MySQL installation path bin directory (C: \Program Files\MySQL\MySQL Server 8.0\bin), double-click mysqld.exe to run the server.

Step 4: Set MySQL environment variables

Setting MySQL environment variables can facilitate users to quickly enter the MySQL command line in the cmd window. The operation method is as follows:

  1. Right-click "Computer" or "This PC" and select "Properties";
  2. Click "Advanced System Settings";
  3. Click "Environment Variables";
  4. Find "Path" in the user variable and click "Edit";

  5. Add the MySQL installation path in the input box, such as C:\Program Files\MySQL\MySQL Server 8.0\bin;

Step 5: Log in to MySQL

After completing the above steps, you can use MySQL. Enter "mysql -u root -p" in the cmd window, press Enter and enter the administrator password to log in to the MySQL database.

This article starts with downloading the MySQL installation version and introduces the MySQL installation tutorial. With the above five simple steps, you have successfully installed and set up a MySQL database. I hope this article helps you and allows you to use MySQL more deeply.

The above is the detailed content of How to install mysql (tutorial). For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template