One, MySQL installation (win64)
Free community edition download address: https://dev.mysql.com/downloads/mysql
Then you will jump to this page.
After downloading, we will unzip the zip package to the corresponding directory. Here I will put the unzipped folder under D:\Web\mysql-8.0.19-winx64 .
Open the folder D:\Web\mysql-8.0.19-winx64 that you just unzipped , create a my.ini configuration file in this folder, edit my.ini to configure the following basic information:
[mysql]
default-character-set=utf8 # 默认字符集
[mysqld]
port = 3306 # 端口
basedir=D:\MYSQL\mysql-8.0.17-winx64 # 安装路径
max_connections=20 # 最大连接数
character-set-server=utf8 # 客户端使用的字符集
default-storage-engine=INNODB # 创建新表时将使用的默认存储引擎
Two, configure environment variables
Open My Computer->Properties->Advanced->Environment Variables, select PATH in System Variables, and add after it: the path of your mysql bin folder (such as: * D:\Web\mysql-8.0.19- Winx64 \ bin " ), an additional note is not covered, and then determine the details Figure
3. Registration Service
mysqld --initialize --console
Initialize mysql, note down the password,
mysqld --install
register mysql service,
net start mysql
start mysql service
In win10, 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:
mysqld --initialize --console