当前位置:网站首页>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
边栏推荐
- 国产轻量级看板式Scrum敏捷项目管理工具
- leangoo脑图-共享式多人协作思维导图工具分享
- C语言 171. 最近回文数
- Download the genuine origin Pro 2022 tutorial and how to activate it
- JVM类加载器
- Modify the content of MySQL + PHP drop-down box
- 智能辅助功能丰富,思皓X6安全配置曝光:将于4月23日预售
- Rhcsa day 4 operation
- SQL server2019无法下载所需文件,这可能表示安装程序的版本不再受支持,怎么办了
- Global, exclusive, local Routing Guard
猜你喜欢
Interpretation of the future development of smart agriculture
The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
Day 3 of learning rhcsa
How to solve the complexity of project document management?
Looking for a job, writing a resume to an interview, this set of information is enough!
php+mysql对下拉框搜索的内容修改
工业互联网+危化安全生产综合管理平台怎样建
Flink stream processing engine system learning (III)
接口请求时间太长,jstack观察锁持有情况
Talk about current limiting
随机推荐
[XJTU computer network security and management] Lecture 2 password technology
Machine learning (Zhou Zhihua) Chapter 14 probability graph model
mysql function函数语法
工业互联网+危化安全生产综合管理平台怎样建
Solve the problem that the registered Google email Gmail mobile number cannot be used for verification
能做多大的单片机项目程序开发,就代表了你的敲代码的水平
Practical combat of industrial defect detection project (II) -- steel surface defect detection based on deep learning framework yolov5
Go语言web中间件的使用
Decision tree principle of machine learning
认识进程(多线程_初阶)
Rhcsa second day operation
hack the box optimum靶机
IAR embedded development stm32f103c8t6 Lighting LED
1、 Sequence model
重大危险源企业如何保障年底前完成双预防机制数字化建设任务
Execute external SQL script in MySQL workbench and report error
If you want to learn SQL with a Mac, you should give yourself a good reason to buy a Mac and listen to your opinions
leetcode 烹饪料理
Jupyter for local and remote access to ECS
定了,今日起,本号粉丝可免费参与网易数据分析培训营!