Tutorial on downloading, installing, configuring and using MySQL under Windows

Tutorial on downloading, installing, configuring and using MySQL under Windows

Overview of MySQL

MySQL is a relational database management system. A database is a structured collection of data. Originally developed by Swedish MySQL AB, it is now owned by Oracle. MySQL is a relational database management system that stores data in different tables instead of putting all data in one large warehouse, which increases speed and flexibility.

MySQL Features

Written in C and C++ and tested with multiple compilers to ensure source code portability.
Supports multiple operating systems including Windows, Mac OS, AIX, BSDI, LInux, etc.
APIs are provided for multiple programming languages. Such as C, C++, C#, PHP, JAVA, Python, Ruby, etc.
Support multi-threading, make full use of CPU resources, and support multiple users.
Optimized SQL query algorithm effectively improves query speed.
It can be used as a separate application in the client and server network environment, and can also be embedded in other software as a library.
Provides multi-language support. Such as GB2312, BIG5, UTF-8, etc.
Provides multiple database connection methods such as TCP/IP, ODB and JDBC.
Provides management tools for managing, inspecting, and optimizing database operations.
Can handle large databases with tens of millions of records.

Okay, without further ado, let me start my MySQL learning journey now.

MySQL Installation (Windows x64)

The first step is to download the MySQL database and select the ZIP Archive version (simple, clean, and installation-free) that is suitable for your system bit size.

The second step is to unzip the ZIP Archive version you just downloaded and find the location where you want to install it. Here we take the C: drive as an example. Once you have unzipped it, everything is done. It’s very simple, right? Now you know the benefits of the ZIP Archive version, hehe.

The third step is to configure the default file. If the default configuration is used directly, many problems will occur, such as garbled text, so the configuration file needs to be modified. First, create a my.ini file (.ini is a configuration file for the Windows system) in the directory C:\mysql-xxxx-winx64 (version 5.6.24 is used as an example here). If the configuration file is incorrect, an error message 1067 will be given. Copy the following code into the newly created configuration file and save it.

[mysqld]
#Set port 3306 port = 3306 
# Set the installation directory of mysql basedir=D:\mysql\mysql-5.6.17-winx64
# Set the storage directory of mysql database data datadir=D:\mysql\mysql-5.6.17-winx64\data
# Maximum number of connections allowed max_connections=200
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB

The fourth step is to install the MySQL service. Start -> cmd (enter in the search program or file input box), then press Enter, right-click on the cmd.exe file that appears, select Run as administrator (to ensure that you have sufficient permissions), switch the directory to the MySQL bin directory (for example, enter: cd C:\mysql-5.6.24-winx64\bin and press Enter), enter mysqld install and press Enter. If the prompt is successful, it means the installation is successful. The next step is to start the MySQL service. There are many ways to start the service. The first method is to right-click on the computer icon-->Management-->Services and Applications-->Services, find the MySQL service, and click to start. The second method is faster and is also the method most people use. Simply enter the net start mysql command in the cmd window that was just run, and then press Enter to start the service.

The fifth step is to start mysql. This is also an exciting step. Hehe, switch the directory to the bin directory in cmd, enter mysql -uroot -p and press Enter, enter the password (there is no password by default), and you can set the password through the command mysqladmin -u root -p password. If you want to exit, enter exit and press Enter (Note: you cannot exit by directly closing the cmd window, you must exit through the exit command).

Step 6. Configure environment variables (optional). Right-click the computer --> Properties --> Advanced system settings --> Environment variables --> Path --> Edit, and add C:\mysql-xxxx-winx64\bin; in the front (Note: it must end with a semicolon, xxxx represents your MySQL version). The purpose of configuring environment variables is to avoid switching the directory to the bin directory every time you start MySQL. After configuring the environment variables, let's run mysql, cmd-->mysql -uroot -p --> press Enter to enter the password; now you can create tables, query tables, and perform other operations.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • mysql 8.0.12 winx64 download and installation tutorial
  • Download MySQL 5.7 and detailed installation diagram for MySql on Mac
  • MySQL 5.7.20 common download, installation and configuration methods and simple operation skills (decompression version free installation)
  • MySQL 5.7.20 compressed version download and installation simple tutorial
  • MySQL 5.7.18 download and installation process detailed instructions
  • MySQL 5.7 and above version download and installation graphic tutorial
  • Detailed graphic tutorial for downloading, installing, configuring and using MySQL (win7x64 version 5.7.16)
  • MySQL 5.7 Service Download and Installation Graphical Tutorial (Classic Edition)
  • Detailed explanation of mysql download and installation process

<<:  How to transfer files between Windows and Linux

>>:  JS Asynchronous Stack Tracing: Why await is better than Promise

Recommend

How to set the width and height of html table cells

When making web pages, you often encounter the pr...

Examples of clearfix and clear

This article mainly explains how to use clearfix a...

Detailed explanation of scheduled tasks for ordinary users in Linux

Preface Ordinary users define crontab scheduled t...

How to change the MySQL database file directory in Ubuntu

Preface The company's Ubuntu server places th...

Docker container data volume named mount and anonymous mount issues

Table of contents What is a container data volume...

Summary of Css methods for clearing floats

Float is often used in web page layout, but the f...

About the location of the H1 tag in XHTML

There has been a lot of discussion about H1 recent...

MYSQL database basics - Join operation principle

Join uses the Nested-Loop Join algorithm. There a...

Detailed process of using Vscode combined with docker for development

Preface Using Docker and VS Code can optimize the...

Complete steps to use mock.js in Vue project

Using mock.js in Vue project Development tool sel...

Installation tutorial of MySQL 5.7.17 zip package version under win10

The installation tutorial of mysql5.7.17 is share...

DOM operation implementation in react

Table of contents Previous words Usage scenarios ...

Installation steps of mysql under linux

1. Download the mysql tar file: https://dev.mysql...