Packet compression codecs installed mysql

Re-build development environment after a system crash, lazy and do not want to install unzip files directly from the installation.

1.mysql archive Download: https://dev.mysql.com/downloads/mysql/8.0.html

 

 

 2. Unzip to a local disk;

3. New File my.ini, increase document reads as follows:

[mysql] 
# mysql client set the default character set 
default Character-SET-UTF8 = 
[mysqld] 
# 3306 port disposed 
Port = 3306 
# mysql installation directory setting 
the basedir = C: \\ mysql-8.0.18-Winx64 
# allowable maximum connections 
max_connections = 200 is 
# character set used by the server defaults to the 8-bit coded character set latin1 
character-set-server = utf8 
default storage engine # when used to create a new table 
default-storage-engine = INNODB

Note: Red decompression path "\\."  

4. Configure environment variables, adding MYSQL unzip the package where bin path in Path, the mine is C: \ mysql-8.0.18-winx64 \ bin.

5. Click Mail , select "Windows PowerShell (administrator)", cmd to open a command window administrator rights;

Enter the command:. \ Mysqld --install show success:

PS C:\mysql-8.0.18-winx64\bin> .\mysqld --install
Service successfully installed.

Enter:. \ Mysqld --initialize, this time in the extracted directory C: \ directory data generation mysql-8.0.18-winx64.

 Then enter: net start mysql display 

C PS: \ MySQL-8.0.18-Winx64 \ bin> \ mysqld --initialize.
PS C: \ MySQL-8.0.18-Winx64 \ bin> \ mysqld.
PS C: \ MySQL-8.0.18-Winx64 \ bin > NET start MySQL
MySQL service is starting.
MySQL service has started successfully.

6. Enter \ mysql -uroot -p, enter mysql, the following error message appears:

 

 7. data directory to find the .err suffix file:

 

 Open the file to find the following information:

 

 Use random password: ", 5Cu3IWdfygf" login.

 

 8. Change your password, re-visit successful:

 

Guess you like

Origin www.cnblogs.com/Joezhang433/p/11701530.html