MySQL 8.0 version of the free installation unpack and download the configuration procedure

MySQL has been like learning another language has not been shelved for a long time to learn, I was finally put on the agenda, while learning, while share. The summary record of the content they learn, and share, not only to their own power, but also to their pressure, push myself to improve. I welcome you and Come together ~

MySQL installation is divided into two types, one is the installation version, one is free to install unzip version, usually the teacher will recommend free installation unpack version, using them more convenient. Today and share MySQL8.0 version unpacked version of the installation steps. Although most enterprises still in version 5.7 because 8.0 is too expensive, but we are learning, you can directly use the free version, we specifically look it!

First have to download the installation package, the direct Quguan network can download the 8.0 version of the archive at the link on hold, you can go directly to the official website of Baidu search, then follow below, find the corresponding free version:

MySQL 8.0 version of the free installation unpack and download the configuration procedure

Personal free version

Then according to the figures, and in accordance with the system configuration of your computer, download the corresponding archive.

MySQL 8.0 version of the free installation unpack and download the configuration procedure

Find a suitable PC version

After preparatory work well, they begin to install it, in fact, the method is relatively simple:

1, first extracting archive, as shown below (not recommended on the C drive, other disk may be);

MySQL 8.0 version of the free installation unpack and download the configuration procedure

After extracting the contents of

2, after extracting configuration environment variable, configure the environment variables:

MySQL 8.0 version of the free installation unpack and download the configuration procedure

Configuration environment variable

Path environment variable path is:

Right-click "Computer" - select "Properties" - Advanced System Configuration - Environment variables - path:

MySQL 8.0 version of the free installation unpack and download the configuration procedure

Configuration environment variable path

3, create a my.ini file (first built my.txt file, and then modify the file suffix to ini):

[mysqld]

Set # 3306 Port

port=3306

# Set the mysql installation directory

basedir=E:\Program Files\mysql-8.0.12-winx64

# Set the data storage directory of mysql database

datadir=E:\Program Files\mysql-8.0.12-winx64\data

# Maximum number of connections allowed

max_connections=200

# Allowed number of failed connections.

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

# 默认使用“mysql_native_password”插件认证

# mysql_native_password

default_authentication_plugin=mysql_native_password

# 设置默认时区为东八区

default-time-zone = '+8:00'

[mysql]

# 设置mysql客户端默认字符集

default-character-set=utf8

[client]

# 设置mysql客户端连接服务端时默认使用的端口

port=3306

default-character-set=utf8

将以上这一段内容,复制在my.ini文档里。

注意:要调整安装目录及数据库的存放目录,即这两个地方:

# 设置mysql的安装目录

basedir=E:\Program Files\mysql-8.0.12-winx64(修改成放mysql的文件路径)

# 设置mysql数据库的数据的存放目录

datadir=E:\Program Files\mysql-8.0.12-winx64\data(修改成放mysql的文件路径/data)

4、初始化my.ini文件:

使用管理员的权限,打开CMD,进入到mysql的bin路径,然后输入:

mysqld --initialize --console

初始化之后,会生成一个初始化密码,这个密码需要记住,建议复制在txt文档中,后续登录时,需要用到此密码,密码就root @ localhost: 这个后面,因为每个人安装都会生成随机密码,完全不一样,所以为了避免误导大家,就不截图了。

5、安装并启动 mysql服务:

这个也是一样,需要使用管理员的权限,打开CMD,进入到mysql的bin路径,输入:

mysqld --install mysql

注意:这里的mysql是服务器名称,若是原来电脑里有其他版本的,可以后面加个数字区分开,以下我默认服务器的名称就是mysql,所以再启动服务器:

net start mysql

6, log in MySQL, and change your password:

Run the command: mysql -uroot -p

Temporary password (that is, before the initialization time, save the random password)

Then enter the command to change the password:

alter user 'root'@'localhost' identified by 'root';

This is a modified root password, and then enter the exit, after exit mysql, and then root password to re-login.

These are decompressed version of MySQL 8.0, the version that is free installation configuration, you learn it? If there do not understand the message of welcome to ask questions, we learn and grow together.

Guess you like

Origin www.cnblogs.com/WIU1905/p/11802856.html