Home>Article>Database> mysql 8.0.20 installation tutorial and precautions (pictures and texts)

mysql 8.0.20 installation tutorial and precautions (pictures and texts)

hzc
hzc Original
2020-06-18 11:01:18 6204browse

mysql 8.0.20 installation tutorial and precautions (pictures and texts)

MySQL 8.0.20 installation tutorial

1: mysql official website download

https://dev.mysql.com/downloads/file/?id=494993

mysql 8.0.20 installation tutorial and precautions (pictures and texts)

No need to register , just download it directly

2: Unzip

Forgive my technical scum, all folders I've looked through it all, but I really can't find which folder mysql-installer is in. I really don't know which file should be run (anyone who knows is welcome to give guidance)

ok There is no my.ini in the decompressed directory. file, then configure it yourself. Create my.ini added in the installation root directory and write the basic configuration:

[mysqld] # 设置3306端口 port=3306 # 设置mysql的安装目录 basedir=C:\Program Files\MySQL # 设置mysql数据库的数据的存放目录 datadir=C:\Program Files\MySQL\Data # 允许最大连接数 max_connections=200 # 允许连接失败的次数。 max_connect_errors=10 # 服务端使用的字符集默认为utf8mb4 character-set-server=utf8mb4 # 创建新表时将使用的默认存储引擎 default-storage-engine=INNODB # 默认使用“mysql_native_password”插件认证 #mysql_native_password default_authentication_plugin=mysql_native_password [mysql] # 设置mysql客户端默认字符集 default-character-set=utf8mb4 [client] # 设置mysql客户端连接服务端时默认使用的端口 port=3306 default-character-set=utf8mb4

Please note that the paths are the same. If it does not change, just be the same as me.

Three:Initialize mysql and run cmd as administrator

mysql 8.0.20 installation tutorial and precautions (pictures and texts)

##Enter mysql folder bin directory

and run the command

mysqld --initialize --console

mysql 8.0.20 installation tutorial and precautions (pictures and texts)

This is the initial password, be sure to write it down, it will be used later! ! ! !

If an error is reported in this step, it means that some libraries required by Microsoft are missing. Add them on Baidu yourself

Four: Install and start the mysql service

Install mysql service execution

mysqld --install [service name] The service name does not need to be added, the default is mysql

Very good, successful , after the service is successfully installed, use the command

net start mysql

to start the mysql service

mysql has been installed,

Five: Digression

The password I just asked everyone to remember, hmm, that’s right! It may be a little troublesome if you forget it. It is all over the Internet. If you forget your password for Baidu mysql, you can do it yourself.

Change the password and connect to the database in the bin directory of mysql

mysql -u root -p

mysql 8.0.20 installation tutorial and precautions (pictures and texts)

The display is normal, then enter the command

ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';

Recommended tutorial: "

mysql video tutorial"

The above is the detailed content of mysql 8.0.20 installation tutorial and precautions (pictures and texts). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn