Detailed steps for installing mysql in Win
- 2021-12-12 10:11:59
- OfStack
This article shares the detailed steps of installing mysql in Win for your reference. The specific contents are as follows
mysql Download Directory
Select the installation-free version of "Windows (x86, 64-bit), ZIP Archive"
After unzipping, create my. ini in the mysql unzipping directory, as shown in the following example:
# Database Server Configuration Items
[mysqld]
# Database path
basedir=D:\\Program Files\\MySQL\\mysql-8.0.12-winx64
# Data path
datadir=D:\\Program Files\\MySQL\\data
# Port number
port=3306
# Default character set
character-set-server=utf8mb4
# Storage engine
default-storage-engine=INNODB
# Client Configuration Items
[mysql]
# Default character set
default-character-set=utf8mb4
# Connect Client Configuration Items
[client]
default-character-set=utf8mb4
If there is my-default. ini, change this file to my. ini, and then write the above.
Installation:
Register mysql as an windows system service
1) Enter the bin directory under the MySQL unzipped directory from the console:
2) Enter the service installation command:
mysqld install MySQL --defaults-file="MySQL Extract directory \my.ini"
After successful installation, the service will be prompted for successful installation.
# The Remove Service command is: mysqld remove
Start the service:
net start mysql
If you cannot start, execute the following command:
mysqld --initialize-insecure --user=mysql
Stop service: Stop mysql before removing mysql service:
Stop mysql: net stop mysql
Remove service: mysqld remove