Installation MySql-8.0.16-winx64

 

Reference article:

https://www.cnblogs.com/lxlin/p/9635350.html

https://www.cnblogs.com/xc1234/p/9050149.html

 

MySql Download :

https://dev.mysql.com/downloads/mysql/

Select the corresponding software according to their own computer systems

 

Command line installation

After decompression, the file is located in: D: \ Program Files \ mysql-8.0.16-winx64,

New in the current directory: my.ini file (configuration file: configure the port number, mysql installation directory, store directories, etc.), as follows:

[mysqld]
Set # 3306 Port
port=3306
# Set the mysql installation directory
basedir=D:\Program Files\mysql-8.0.16-winx64
# Set the data storage directory of mysql database
datadir=D:\Program Files\mysql-8.0.16-winx64\Data
# Maximum number of connections allowed
max_connections=200
# Allowed number of failed connections. This is to prevent someone from trying to attack the host database system
max_connect_errors=10
# Server using the default character set to UTF8
character-set-server=utf8
The default storage engine that will be used when creating a new table #
default-storage-engine=INNODB
# Default "mysql_native_password" plug-in authentication
default_authentication_plugin=mysql_native_password
[mysql]
# Mysql client to set the default character set
default-character-set=utf8
[client]
# Set the port to connect the server using the default mysql client
port=3306
default-character-set=utf8

 

Use an administrator  to run cmd command, enter D: \ Program Files \ mysql- 8.0.16-winx64 \ bin directory  


d: D cd: \ Program Files \ MySQL-8.0.16-Winx64 \ bin

- initialization, prints database password, remember this password will be used later
mysqld --initialize the --console

- here MySql8 is the name of the service, you can not write their own name or a service
mysqld --install Mysql8


- here is to start the service name, the name is just named
NET start mysql8


- landing database, then let you enter a password
MySQL -u root -p

- password is too hard to remember, to change the password: 123456
the SET password for root @ localhost = '123456';


- display so the database
show databases;

 

 

 

 Mysql database connection using Navicat Premium

As shown, the port number from: the my.ini file, the password is: 123,456

 

Guess you like

Origin www.cnblogs.com/hanliping/p/11073666.html