当前位置:网站首页>Windows MySQL 8 zip installation
Windows MySQL 8 zip installation
2022-04-23 02:41:00 【An effort to XX program yuan】
- Download from the official website zip Installation package :MySQL Official website

- Unzip in a directory , I put it in D:\software, Modify the extracted file mysql-8.0.11-winx64 Under the my.ini file , Set up
basedir = D:/software/mysql-8.0.11-winx64/
datadir = D:/software/mysql-8.0.11-winx64/data/ - about mysql5.7 Later versions , You need to run the following command on the command line first , Installation services , A temporary password will be generated :
mysqld --initialize --console
If prompted by the following Cant create directory … Failure , The first 2 Step basedir and datadir The file directory is a backslash /, And need to be on your own mysql-8.0.11-winx64 Create one in the directory data Folder .
The following tips , Indicates successful initialization , The temporary password is gvTuqg-PV4ek:

-
Installation services ,mysqld -install service name
for example : mysqld -install MySQL8 -
perform net start MySQL8 start-up mysql,MySQL8 It is the service name named by itself , If not, the default is mysql.
Note that if more than one... Is installed on the machine mysql, Because there is a line in the configuration file enable-named-pipe, Named pipes are enabled , And the default service names are MySQL, therefore , When you initialize the second mysql, Startup time , error , You can see err.log There's a hint in Can’t start server : Named Pipe “MySQL” already in use. Modify the configuration file , Add a setting , take socket Property is set to your service name ( Because your second mysql The service name must have been modified , Will not duplicate the first service name ), therefore , Be sure to use your second mysql Service name of .
socket=MySQL8
socket=MySQL -
Log in with the generated password mysql, for example :mysql -uroot -pgvTuqg-PV4ek Sign in .-pgvTuqg-PV4ek It's my temporary password .
-
Be careful : stay mysql5.7 In the environment , Although it can be set default_authentication_plugin To change the authentication encryption method , But it's not usually set . stay mysql8.0 Next , Default becomes default_authentication_plugin=caching_sha2_password, Including the one you just initialized root The user is also the authentication encryption method , The result is that unless you drive with a new protocol , For example, you must use 8.0 Self contained mysql Client only , At present, many database tools and link packages do not support “caching_sha2_password”, So you can't connect to the database , Cause incompatibility , fortunately , It can be changed back to the old way . modify my.ini
default_authentication_plugin=mysql_native_password
And then restart -
After logging in, first modify root For localhost Password
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘root’; -
If you need a remote connection , You need to create a for ’%' Users of
create user 'root'@'%' identified by '123456';
- Create the corresponding database
create database test;
- by test Database creation user
CREATE USER 'testuser'@'localhost' IDENTIFIED BY '123456';
- Grant users access to the corresponding database
The first is localhost user , The second is for remote users
GRANT ALL PRIVILEGES ON xx_db.* TO 'testuser'@'localhost';
GRANT ALL PRIVILEGES ON xx_db.* TO 'testuser'@'%' ;
- use navicat Unable to connect to the database , Execute the following command
alter user 'root'@'%' identified with mysql_native_password by 'root';
alter user 'root'@'localhost' identified with mysql_native_password by 'root';
版权声明
本文为[An effort to XX program yuan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230239165549.html
边栏推荐
- C language 171 Number of recent palindromes
- Fashion MNIST 数据集分类训练
- Use of go language web Middleware
- Rhcsa day 1 operation
- Using go language to build web server
- 【2019-CVPR-3D人体姿态估计】Fast and Robust Multi-Person 3D Pose Estimation from Multiple Views
- 全局、独享、局部路由守卫
- Halo open source project learning (I): project launch
- Actual combat of industrial defect detection project (IV) -- ceramic defect detection based on hrnet
- Global, exclusive, local Routing Guard
猜你喜欢
随机推荐
JDBC JDBC
MySQL JDBC programming
How to build an integrated industrial Internet plus hazardous safety production management platform?
[untitled]
Servlet template engine usage example
JZ22 链表中倒数最后k个结点
Modify the content of MySQL + PHP drop-down box
[XJTU computer network security and management] Lecture 2 password technology
WordPress calls the specified page content. 2 get_ children()
类初始化和实例初始化面试题
ROP Emporium x86_ 64 7 ~ 8 questions
Preliminary understanding of stack and queue
16、 Anomaly detection
mysql function函数语法
IAR嵌入式开发STM32f103c8t6之点亮LED灯
Download the genuine origin Pro 2022 tutorial and how to activate it
How can enterprises with major hazard installations ensure the completion of the digital construction task of double prevention mechanism by the end of the year
[XJTU計算機網絡安全與管理]第二講 密碼技術
Practice of industrial defect detection project (III) -- Based on FPN_ PCB defect detection of tensorflow
How to prevent leakage of operation and maintenance data




![[untitled]](/img/60/421cda552055664357af47d1a956af.png)




![[XJTU计算机网络安全与管理]第二讲 密码技术](/img/b0/263e8dcbfeb2ce9f504a9c8eb76b07.png)