Article Directory
-
Error content
-
mysql installation configuration
-
Cause of failure
-
Solution
-
my.ini file contents
mysql error
mysql8 installation configuration, preconditions
1 Download the zip file, configure the environment variables
2 Add my.ini file
3 data directory not need to create, during the execution of the command will be generated automatically
4 cmd to open an account with administrator
Initialization - mysqld --initialize-insecure
Installation -mysqld install Mysql8
Start Service -net start Mysql8
Failure: the port is occupied
Solution:
1 hit cmd, enter netstat -aon | findstr "3306", hit the 3306 occupation of the port corresponding to the program PID number
The PID number to find the corresponding program: tasklist | findstr "PID number", find the corresponding program name
3. To end the process: taskkill / f / t / im program name
(Or may be in the details Task Manager, view the corresponding PID, then hand off the end of the process), task manager, under the windows, the bottom (navigation bar), right-click to open the Task Manager
my.ini file as follows (in the root directory of Folder mysql):
[mysqld]
# 3306 port disposed
Port = 3306
# mysql installation directory setting
the basedir = D: \ K \ the Python \ mysql-8.0.18-Winx64
# data set storage directory database mysql
datadir = D: \ k \ Python \ Winx64-8.0.18-MySQL \ Data
# the maximum number of connections allowed
max_connections = 200 is
# character set used by the server defaults to the 8-bit coded character set latin1
character-set-server = utf8
default # create a new table is stored to be used engine
default-Storage-engine = INNODB
# default "mysql_native_password" plug-in authentication
#mysql_native_password
default_authentication_plugin = mysql_native_password
[mysql]
# mysql client to set the default character set
default-character-the sET utf8 =
[client]
# mysql client connection settings server when using the default port
port = 3306
default-Character-SET = UTF8