For local development environment, more suitable for local small Mysql learning.
This paper environment win10 + mysql8
1. Download
Mysql official website to download the installation package - https://dev.mysql.com/downloads/mysql/
2, extract
Download the installation package to extract the position you want to install.
3, installation
Administrator cmd to open
-> switching to the bin directory under the directory mysql
-> Run mysqld -install
-> Database initialization, Run mysqld --initialize-insecure --user = mysql
-> Locate the newly generated in the mysql directory data directory, read .err suffix for the file, find the initial user name and password
-> New in the mysql directory my.ini, and write a configuration file, change their address
[mysqld] basedir=D:\PHP-DEV\mysql-8.0.18 datadir=D:\PHP-DEV\mysql-8.0.18\data port=3306
4, start the service
Run net start mysql
Set a password, Note that the last end with a semicolon set password for root @ localhost = password ( 'xxxxxx');
5, configure the environment variables
Add the mysql bin directory to the path environment variable.