There are two types of MySQL installation files, one in msi format and the other in zip format. Click to enter: Download address 1. Below are the steps to download and install msi After clicking in, download according to the number of bits on your computer. After downloading, you can refer to the following installation steps to install You need to set the MySQL login password here, which is required when connecting to the database. Username is: root After the installation is complete, you can start by clicking MySQL to connect to the database. 2. Below are the steps to download and install the zip Download according to the number of bits on your computer. After downloading, you can refer to the following installation steps to install 1. Unzip the compressed package to drive D. The path is: D:\mysql-5.7.25-winx64 2. Copy the my.ini file to the D:\mysql-5.7.25-winx64 path 3. Configure environment variables Edit the key name: Path value is: D:\mysql-5.7.25-winx64\bin; 4. In the D:\mysql-5.7.25-winx64\bin directory, enter cmd to start the console Execute mysqld -install to install MySQL Execute mysqld --initialize-insecure --user=mysql to initialize MySQL Execute net start mysql to start the mysql service Execute mysqladmin -u root -p password to set a new password Enter password: Press Enter and enter the new password root twice. 5. Complete the installation and connect to the database mysql -h localhost -u root -p Note: Under win10, you need to execute the above command under Windows PowerShell (Administrator) (in Start) The following is the configuration file my.ini [mysqld] #Set MySQL installation path basedir = D:/mysql-5.7.25-winx64 #Set the storage directory of mysql database data, which is data datadir = D:/mysql-5.7.25-winx64/data #Set the database connection port port = 3306 #Set the character set of the MySQL server character-set-server=utf8 #default-storage-engine=MyISAM default-storage-engine=INNODB #Support INNODB engine mode. Just change it to default-storage-engine=INNODB. #If the INNODB mode cannot be started, delete the log file starting with ib in the data directory and restart. #Set the maximum number of connections max_connections=512 #Allow temporary storage in the query cache size query_cache_size=0 If it is not installed in the D: root directory, you need to change the installation steps 3. Configure environment variables Edit the key name: Path value: D:\mysql-5.7.25-winx64\bin; Change D:\mysql-5.7.25-winx64\bin; to the path you installed, the path needs to be in the bin directory. As well as the configuration file my.ini #Set MySQL installation path basedir = D:/mysql-5.7.25-winx64 and #Set the storage directory of MySQL database data, which is data datadir = D:/mysql-5.7.25-winx64/data, both paths need to be changed. 4. Change login password Method 1 c:\>mysqladmin -uroot -p old password password new password Method 2 mysql>use mysql; -- Note: In previous versions, the field name of the password field was password, but it was changed to acthentication string in version 5.7. mysql>update user set password=password('new password') where user='root'; mysql>flush privileges; 5. Exit the database Method 1 mysql>exit; Method 2 mysql>quit; Method 3 mysql>\q; 6. Stop MySQL Server mysql>net stop mysql 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:
|
<<: How to use dynamic parameters and calculated properties in Vue
This article shares the specific code of JavaScri...
Table of contents 1. Background running jobs 2. U...
For example, when you create a new table or updat...
Table of contents Variable type and storage space...
When newbies develop div+css, they need to name t...
Using the internal function instr in MySQL can re...
The first line of a Docker image starts with an i...
Context definition and purpose Context provides a...
HTML page jump: window.open(url, "", &q...
Preface This article mainly shares with you an ex...
Introduction: The configuration of Docker running...
1: readonly is to lock this control so that it can...
Table of contents Environment Preparation Environ...
The props of the component (props is an object) F...
I hope to align the title on the left and the dat...