当前位置:网站首页>Mysql database installation
Mysql database installation
2022-06-13 04:33:00 【gohxc】
mysql Database installation
Environmental Science :windows10
1. download mysql
Download address :https://dev.mysql.com/downloads/mysql/
Download the latest version :mysql-8.0.12-winx64.zip, Please download other versions by yourself
After downloading , We will zip Extract the package to the corresponding directory , Here I put the unzipped folder in C:\software\mysql-8.0.12 Next .
2. To configure mysql
stay Windows In the system , The configuration file is in the installation directory by default my.ini file ( or my-default.ini), Open the folder you just unzipped C:\software\mysql-8.0.12 , We found that the unzipped directory did not my.ini file , It's OK to create your own .
Create... Under this folder my.ini The configuration file , edit my.ini Configure the following basic information :
[mysql]
# Set up mysql Client default character set
default-character-set=utf8
[mysqld]
# Set up 3306 port
port = 3306
# Set up mysql Installation directory
basedir=C:\software\mysql-8.0.12
# Set up mysql Database data storage directory
datadir=C:\software\mysql-8.0.12\data
# Maximum connections allowed
max_connections=20
# The character set used by the server defaults to 8 Bit coded latin1 Character set
character-set-server=utf8
# The default storage engine that will be used when creating a new table
default-storage-engine=INNODB
View all configuration items , May refer to :https://dev.mysql.com/doc/refman/8.0/en/mysqld-option-tables.html
3. initialization mysql
Open as administrator cmd Command line tools , Toggle directory :
cd C:\software\mysql-8.0.12\bin
Initialize database :mysqld --initialize --console
After execution , Will be output root User's initial default password , as follows :
C:\software\mysql-8.0.12\bin>mysqld --initialize --console
2018-09-10T01:47:14.402512Z 0 [System] [MY-013169] [Server] C:\software\mysql-8.0.12\bin\mysqld.exe (mysqld 8.0.12) initializing of server in progress as process 8272
2018-09-10T01:47:33.792827Z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: SErl6hlv&vf%
2018-09-10T01:48:16.423314Z 0 [System] [MY-013170] [Server] C:\software\mysql-8.0.12\bin\mysqld.exe (mysqld 8.0.12) initializing of server has completed
C:\software\mysql-8.0.12\bin>
among [email protected]: hinder “SErl6hlv&vf%” It's the initial password . Before changing the password , You need to remember the code , Subsequent login needs to use .
If your hands are cheap , It's closing fast , Or don't remember , That's OK , Delete the initialized datadir Catalog , Execute the initialization command again , It's going to regenerate .
4. Installation services
stay MySQL Installation directory bin Execute command under directory
mysqld –install [ service name ]
The following service name can be left blank , The default name is mysql. Of course , If you need to install more than one on your computer MySQL service , It can be distinguished by different names , such as mysql5 and mysql8. This use mysqld --install mysql8
After installation , By order net start mysql start-up MySQL Service. . as follows :
C:\software\mysql-8.0.12\bin>mysqld --install mysql8
Service successfully installed.
C:\software\mysql-8.0.12\bin>net start mysql8
mysql8 The service is starting ..
mysql8 Service started successfully .
C:\software\mysql-8.0.12\bin>
5. Change password
stay MySQL Installation directory bin Execute command under directory : mysql -u root -p
You will be prompted to enter the password , Enter the password obtained above .
Change user password , stay MySQL Middle execution command :
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ' Your password ';
The command contains ”;” Semicolon
Then input quit
Exit and log in again
link MySQL Tools for :
In general use SQLyog, Search and download .
1. Use sqlyog link mysql
Configuration new connection error : Wrong number 2058, The analysis is mysql Password encryption has changed .
resolvent :
// Use the above 5 Method to change the password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
2. see mysql Port number : show global variables like 'port';
边栏推荐
- Ionic Cordova command line
- This Sedata uses multiple methods to dynamically modify objects and values in arrays. Object calculation properties
- Sword finger offer 56 - I. number of occurrences in the array
- Li Kou brush question 647 Palindrome substring
- [sword finger offer] interview question 25 Merge two ordered linked lists
- Click change color to change subscript
- 力扣刷题647.回文子串
- 在线音频调节技术汇总
- Ctfshow SQL injection (211-230)
- Alipay native components (hotel time selection)
猜你喜欢
Applet - uniapp realizes the functions of two-dimensional code picture pop-up and picture saving
Record a troubleshooting process - video call cannot be picked up
Dumi construit un blog documentaire
Ultra quicksort reverse sequence pair
CTFSHOW SQL注入篇(231-253)
Simple static web page + animation (small case)
2022 ICML | Pocket2Mol: Efficient Molecular Sampling Based on 3D Protein Pockets
ACM ICPC
小程序基础入门(黑马学习笔记)
CreateAnonymousThreadX给匿名线程传递参数
随机推荐
一款开源的Markdown转富文本编辑器的实现原理剖析
Suffix Automaton
knife4j aggregation 2.0.9支持路由文档自动刷新
Hugo blog building tutorial
Uni app enables pull-up loading and pull-down refresh (pull-down with animation)
Common encryption and decryption function encapsulation - AES encryption and decryption
Sword finger offer 11 Minimum number of rotation array - binary lookup
PowerShell:因为在此系统上禁止运行脚本,解决方法
【剑指Offer】面试题24.反转链表
记录一次排查问题的经过——视频通话无法接起
Redis data persistence
Returns the width and height of an element
Explanation of line segment tree
【剑指Offer】面试题25.合并两个有序的链表
7-289 tag count (300 points)
php安全开发15用户密码修改模块
Ctfshow common postures (821-830)
是“凯撒密码”呀。(*‘▽‘*)*
【自动化测试】关于unittest你需要知道的事
php 18 首页的文章列表功能实现