Win10 OS installation (configuration) MySQL 5.7 (decompressed version)
Download and unzip
Download: https://dev.mysql.com/downloads/mysql/5.7.html#downloads
File name: mysql-5.7.27-win32.zip
zip is decompressed version, MSI is installed version, only present course of configuring zip format.
Decompression (after decompression assuming root path D: \ ide \ mysql-5.7.27-win32)
Related Screenshots
Add the system environment variables
How to open Windows- environment variable management interface
increasing the path D: \ ide \ mysql-5.7.27-win32 \ bin
Configuration my.ini
- The my.ini new file, as follows, and the file into the D: \ at ide \ mysql-5.7.27-win32.
- Note: the need to modify the file basedir, datadir value; path to the left slash slash "/."
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:/ide/mysql-5.7.27-win32
# 设置mysql数据库的数据的存放目录
datadir=D:/ide/mysql-5.7.27-win32/data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
installation
- Open cmd window as an administrator, execute the following command:
mysqld -install mysql
- Display
Service successfully installed.
indicates a successful installation. - If an error related to missing dll file , install the following packages to install. (Microsoft common runtime library collection)
- Links: https://pan.baidu.com/s/1dR6AGvG0piym7gurBkrHXA extraction code: w2rv
- Other commands:
mysqld -install mysql --defaults-file=D:\ide\mysql-5.7.27-win32\my.ini
mysqld -install mysql --defaults-file=D:\ide\mysql-5.7.27-win32\my.ini
mysqld --install --defaults-file=D:\ide\mysql-5.7.27-win32\my.ini
initialization
mysqld --initialize-insecure --user=mysql
- Other commands
mysqld --initialize-insecure --user=mysql
mysqld --initialize --user=mysql
mysqld –initialize –console
start up
net start mysql
- Successful start display content
mysql 服务正在启动 .
mysql 服务已经启动成功。
- Log in mysql and change the password, the default password is blank.
mysql -u root -p
set password = password("新密码");
Uninstall
- mysqld -remove [service name]
mysqld -remove mysql