MySQL is the most commonly used database. You must install one on your computer to learn more. If you don’t understand something, you should practice writing more SQL statements. First, go to the MySQL official website to download it, address: https://dev.mysql.com/downloads/mysql/ Select the version in the picture above to download the latest version of MySQL for Windows. After clicking it, it will not download immediately, but will jump to the page in the picture below. Just click No thanks, just start my download. Next, start downloading. After the download is complete, you can unzip it to where you want. Generally speaking, it is best not to put too many things in the C drive, so I put it in the D drive. The picture below shows what it looks like after unzipping. You need to create the my.ini configuration file yourself. The my.ini in the picture is created by me The contents of the my.ini file are as follows: [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [mysqld] # Set port 3306 port = 3306 # Set the installation directory of mysql basedir=D:\Program Files (x86)\MySQL\mysql-8.0.13-winx64 # Set the storage directory for the MySQL database data. MySQL 8+ does not require the following configuration, the system can generate it by itself, otherwise an error may be reported # datadir=D:\Users\sqldata # Maximum number of connections allowed max_connections=20 # 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 After the MySQL configuration file is ready, you can start the database service. First, we run the command control symbol as an administrator. As shown in the figure, in win10, click the small circle in the lower left corner, enter cmd, right-click on the management prompt and select Run as administrator After entering this page, cd to the MySQL installation directory. Initialize the database: After initializing the database, a default password will appear as shown in the figure: 1SofNjpitN*h Install: Start the service: The operation is shown as follows: After starting the service, you start using the database. First, log in to the database. Order: Parameter Description: -h: specifies the MySQL host name that the client wants to log in to. This parameter can be omitted when logging in to the local machine (localhost or 127.0.0.1); -u: the login username; -p: tells the server that a password will be used to log in. If the username and password to be logged in are empty, this option can be ignored. If we want to log in to the local MySQL database, we only need to enter the following command: Press Enter to confirm. If the installation is correct and MySQL is running, you will get the following response: After successful login, as shown in the figure The command prompt will then continue to display mysq> with a blinking cursor, waiting for input of commands. Type exit or quit to log out. Please note that you need to change your password when you log in for the first time, otherwise you will get the error "You must reset your password using ALTER USER statement before executing this statement." Change password command: alter So we can use MySQL Select database first Command: use mysql; Next, you can operate on this database. You can use the show table; command to view all the tables under this database, etc. When writing MySQL commands, they must end with a semicolon. This is the end of the MySQL installation tutorial. I will write more in-depth content later. Come on, everyone! Summarize The above is the detailed graphic and text explanation of MySQL 8.0.13 download and installation tutorial introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time! You may also be interested in:
|
<<: Embedded transplant docker error problem (summary)
If you have installed the Win10 system and want t...
Table of contents Install Dependencies Install bo...
1. Introduction The previous program architecture...
1. This is a bit complicated to understand, I hop...
Table of contents Binding Class Binding inline st...
background: Because the server deployed the flask...
Table of contents Preface Earlier iterations Iter...
Common nmcli commands based on RHEL8/CentOS8 # Vi...
Sample code: import java.util.Random; import java...
Currently, Docker has an official mirror for Chin...
How to refresh iframe 1. To refresh, you can use j...
Judgment symbols are often used in MySQL, and not...
All blogs listed below are original and uniquely ...
1. Download MySQL Image Command: docker pull mysq...
Two small problems, but they bothered me for a lon...