MySQL 8.0.20 installation tutorial
1: mysql official website download
https://dev.mysql.com/downloads/file/?id=494993
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
##Enter mysql folder bin directory and run the commandmysqld --initialize --console
Four: Install and start the mysql service
Install mysql service executionmysqld --install [service name] The service name does not need to be added, the default is mysqlVery good, successful , after the service is successfully installed, use the command net start mysql to start the mysql servicemysql 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 mysqlmysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';
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!