Download and Install Configure and Use Tutorial of MySQL under Windows

  • 2021-09-24 23:53:51
  • OfStack

Overview of MySQL

MySQL is a relational database management system, and a database is a structured data set. Originally developed by Sweden's MySQL AB, it now belongs to Oracle. MySQL is an associated database management system that stores data in separate tables instead of putting all data in a single warehouse, which increases speed and flexibility.

MySQL characteristics

Written using C and C + +, and using a variety of compilers for testing, to ensure the portability of source code.
Support Windows, Mac, OS, AIX, BSDI, LInux and other operating systems.
API is provided for many programming languages. Such as C, C + +, C #, PHP, JAVA, Python, Ruby, etc.
Support multithreading, make full use of CPU resources, and support multi-users.
The optimized SQL query algorithm can effectively improve the query speed.
It can be used as a single application in the client and server network environment, and can also be embedded into other software as a library.
Provide multilingual support. Such as GB2312, BIG5, UTF-8, etc.
Provides TCP/IP, ODB, JDBC and other database connections.
Provide management tools for managing, checking and optimizing database operations.
It can handle large databases with tens of millions of records.

Ok, no more nonsense, let me start my Mysql study tour now.

MySQL Installation (Windows x64)

Step 1: Download the MySQL database, and select the ZIP Archive version (simple, clean, installation-free) that suits the number of bits of your system to download.

Step 2: Extract the newly downloaded ZIP Archive version and find the place where you want to install it. Here, 1C: Take the disk as an example. After decompressing, ok is very simple, right? Know the benefits of ZIP Archive version, hey hey.

Step 3, configure the default file, because if you use the default configuration directly, there will be many problems, such as text garbled, etc., so you need to modify the configuration file under 1. First, in the directory of C:\ mysql-x. x. xx-winx64 (take version 5.6. 24 as an example here), create a new my. ini file (. ini is the configuration file of Windows system). If the configuration file is wrong, an error prompt of 1067 will be given. Copy the following code to the newly created configuration file and save it.


[mysqld]
# Settings 3306 Port 
port = 3306 
#  Settings mysql Installation directory of 
basedir=D:\mysql\mysql-5.6.17-winx64
#  Settings mysql The storage directory of the data in the database 
datadir=D:\mysql\mysql-5.6.17-winx64\data
#  Maximum number of connections allowed 
max_connections=200
#  The character set used by the server defaults to 8 Bit coded latin1 Character set 
character-set-server=utf8
#  Default storage engine to be used when creating new tables 
default-storage-engine=INNODB

Step 4, mysql service installation, start-- > cmd (enter in the search program or file input box), then enter, right-click on the cmd. exe file that appears, select Run as Administrator (to ensure sufficient permissions), switch the directory to the bin directory of mysql (for example, enter: cd C:\ mysql-5. 6.24-winx64\ bin Enter), enter mysqld install Enter, if prompted successfully, 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 the computer icon- > Management- > Services and Applications-- > Service, find the service of mysql, and click Start. The second method is faster and commonly used by most people. Enter the command net start mysql directly in the cmd window just run, and then enter to start the service.

Step 5, start mysql, which is also an exciting step. Hehe, switch the directory to bin directory in cmd, enter mysql-uroot-p carriage return, enter password (there is no password by default), and set password by commanding mysqladmin-u root-p password. If you want to exit, enter exit carriage return.

Step 6, configure environment variables (optional), right-click the computer- > Attributes-- > Advanced System Settings > Environment variables- > path-- > Edit, add C before:\ mysql-x.x.xx-winx64\ bin; (Note: It must end with a semicolon and x. x. xx represents your version of mysql). The purpose of configuring the environment variables is not to switch the directory to the bin directory every time mysql is started. After configuring the environment variables, let's run mysql, cmd-- > mysql -uroot -p -- > Enter the password; At this time, you can build tables, look up tables and other operations.

Wonderful topic sharing:

mysql Different Version Installation Tutorial

mysql 5.7 Versions Installation Tutorial

mysql 5.6 Versions Installation Tutorial

mysql 8.0 Versions Installation Tutorial


Related articles: