- Download mysql,http://dev.mysql.com/downloads/mysql/i download the 5.7.20
- Unzip the database (the path does not have a folder that begins with the T-word), and then configure the environment variable, which is ${mysql5.7.20}/bin. Then create the My.ini file under the ${mysql5.7.20} folder. The contents of the file are as follows:
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=e:\mysql-5.7.20-winx64
# Set up a storage directory for MySQL database data
Datadir=e:\mysql-5.7.20-winx64\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
- In the cmd window, go to ${mysql5.7.20}/bin, execute mysqld install. If the file directory is migrated after it has been installed, the registry changes (regedit Hkey_local_machine-system-currentcontrolset-services/mysql ImagePath) are required.
)
- Executes mysqld--initialize-insecure--user=mysql. If there is an error (Error CODE2: There is no this directory), then carefully look at the output path, is not your path (\ t and the like will be escaped, perhaps I should have changed to/testtool, so there is no problem). The data directory is created. There will be initialized database files in the data directory.
- Input net start MySQL
- Enter Mysql-u root-p, prompt for password, enter directly.
- Quit MySQL: Enter quit
- Shutdown MySQL net stop MySQL, cannot close cmd window directly
Local installation Sonarqube One--win7 environment install MySQL