当前位置:网站首页>MySQL 8.0.27 installation and configuration tutorial under Windows
MySQL 8.0.27 installation and configuration tutorial under Windows
2022-06-09 19:15:00 【1024 Q】
This article is an example for you to share mysql 8.0.27 Specific code for installing and configuring graphic tutorial , For your reference , The details are as follows
download
Download the installation package on the official website :>MySQL :: Download MySQL Community Server


install
1、 Unzip the unzip file to your installation directory :D:\Program Files\MySQL
Be careful : Don't put it in a directory with Chinese names and spaces
2、 stay mysql-8.0.11-winx64 Create a new my.ini Documents and a data Folder
#my.ini Add the following :[mysqld]# Set up 3306 port port=3306# Set up mysql Installation directory basedir=D:/Program Files/MySQL/mysql-8.0.27-winx64# Set up mysql Database data storage directory datadir=D:/Program Files/MySQL/mysql-8.0.27-winx64/data# Maximum connections allowed max_connections=200# Number of connection failures allowed . This is to prevent someone from trying to attack the database system from the host max_connect_errors=10# The character set used by the server defaults to UTF8character-set-server=utf8# The default storage engine that will be used when creating a new table default-storage-engine=INNODB[mysql]# Set up mysql Client default character set default-character-set=utf8[client]# Set up mysql The default port when the client connects to the server port=3306default-character-set=utf83、 Configure system environment
My computer → attribute → senior → environment variable → System variables → newly build
Variable name :MYSQL_HOME
A variable's value :D:\mysql-8.0.27-winx64 ( That's where I just unzipped it )
Path Create a new section :%MYSQL_HOME%\bin

4、 As Administrator ( Be sure to be an administrator ) open cmd Window jump path to
D:\Program Files\MySQL\mysql-8.0.27-winx64\bin
(1) initialization
mysqld --initialize --user=mysql --consoleCorrect result : Record randomly generated passwords , You need to use... When entering the database later .

Existing problems :

Solution :
The reason is because data The directory already exists , Delete data The directory can execute the initialization command again .
(2) Add service
mysqld -install
Existing problems :
Problems arise The service already exists , This is because it has been installed before mysql Clean and not deleted , Run as administrator again , Input sc query mysql, Take a look at the name mysql Service for , If it has been installed before , The following is displayed

Solution : command sc delete mysql, Delete the mysql, Then re install it .

Existing problems : When licensed , Error message Install/Remove of the Service Denied
Solution : open cmd.exe Program time selection “ Open as administrator ”.
(3) Start the service
net start mysql
(4) Log in to the database
mysql -u root -p
(5) Change Password
ALTER USER [email protected] IDENTIFIED BY '123456'; # Change the password to :123456
Two 、 Connect Navicat for MySQL
Connection name : Take at will ; The password is the password just set .

Existing problems : Report errors 1251

Solution : yes mysql8 In previous versions, the encryption rule was mysql_native_password, And in the mysql8 after , The encryption rule is caching_sha2_password, There are two ways to solve the problem , One is upgrading navicat drive , One is the mysql The encryption rule of user login password is restored to mysql_native_password.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; # Modify encryption rules ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER; # Update the user's password FLUSH PRIVILEGES; # Refresh the permissions 
边栏推荐
- How about JPMorgan futures? Is it safe to open futures accounts?
- Former senior economist of the Federal Reserve Hujie: usdd high mortgage rate is good for users
- 投资5.5亿元!默克宣布在中国张家港建先进半导体一体化基地
- TPAMI2022 | 基于对抗性神经表示学习的异构域适应:电子商务与网络安全实验
- Notes sur le premier tableau
- GNN如何泛化?这篇135页pdf博士论文《神经图推理与学习的泛化评估与改进》
- minikube 部署使用
- Why can't the redis module be referenced in the function method called by the foreachpartition method of DF?
- 俄罗斯宣布将限制氖气等惰性气体出口!芯片行业或受影响
- 第一次画板子小记
猜你喜欢

CL210OpenStack操作的故障排除--诊断OpenStack问题

尽一份孝心,为家人做一个老人防摔报警系统

明细表1字符串拼接合并插入到明细表2SQL输出过程记录

Demagnetization and balance adjustment steps of oscilloscope current probe

音频 3A 处理实践,让你的应用更「动听」

Low code analysis and inventory: two misunderstandings need to be avoided in the application of low code in the banking industry

10个常见触发IO瓶颈的高频业务场景

2022年开什么实体店比较赚钱?适合女性做的小成本开店,叶其芳大健康

Pcap file

As a programming ape, do you really know how to operate Google browser
随机推荐
技术分享 | 被测系统架构与数据流分析
最高月薪16K,熬过艰难时刻,终能迎来黎明的曙光~
Technology sharing | selenium multi browser processing
How about opening an account for flush stock? Is it safe to open an account?
低代码分析盘点:银行业低代码应用需要规避两大误区
左手技术,右手生态!英特尔能否赢下这场“数据”战争?
Deep learning and CV tutorial (13) | target detection (SSD, Yolo Series)
The white paper on the panorama of the digital economy, bank wealth management, was released
mfc连接数据库显示未发现数据源名称并且未指定默认驱动程序
FPM tool installation
155_模型_Power BI & Power Pivot 进销存之安全库存
24个月暴涨180万名开发者,Rust 迎来高光时刻
What operation and maintenance software and tools will be used for online operation and maintenance?
Invest 400million euros! Intel and Spanish Supercomputing Center develop risc-v processor, which will be used for 100 billion times of supercomputing
请问为什么不能够在DF的foreachPartition方法调用的函数方法中引用redis模块呢?
微电网数字孪生 | 智能时代,部署源网荷储一体化管控平台
mfc连接数据库显示未发现数据源名称并且未指定默认驱动程序
最长有效括号的问题
紫光展锐手机芯片被曝有严重安全漏洞,全球约10%安卓手机或受影响
前美联储高级经济学家胡捷:从USDD升级看未来金融趋势