mysql 5.7 installation and connection

1. Download address

Download connection https://dev.mysql.com/downloads/mysql/5.7.html
Insert picture description here
2. After downloading, unzip to the directory you want to place
Insert picture description here

3. Create a new my.ini file (the configuration file for mysql)

[client]
# 设置mysql客户端默认字符集
default-character-set=utf8
 
[mysqld]
# 设置3306端口
port = 3306
skip-grant-tables
# 设置mysql的安装目录
basedir=D:\Program Files\mysql-5.7.30-winx64
# 设置 mysql数据库的数据的存放目录,MySQL 8+ 不需要以下配置,系统自己生成即可,否则有可能报错
# datadir=D:\Program Files\mysql-5.7.30-winx64\sqldata
# 允许最大连接数
max_connections=20
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

4. After adding, go to the bin directory of the installation directory in the cmd command window:

Run: net start mysql
Insert picture description here
Then run mysql -u root -p
after entering the password and press Enter
Insert picture description here

5. Test

Connection test in Navicat Premium 12

Insert picture description here

Finished test
Insert picture description here

Guess you like

Origin blog.csdn.net/super__code/article/details/106893259