当前位置:网站首页>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=INNODBView 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';
边栏推荐
- Modeling discussion series 143 data processing, analysis and decision system development
- Sword finger offer 11 Minimum number of rotation array - binary lookup
- Application of dagger2 learning module (II)
- Ionic Cordova command line
- SQL 进阶挑战(1 - 5)
- 你的一对一会议效率低下,你可以这么做!
- 【Try to Hack】upload-labs通关(暂时写到12关)
- Clear timer failure
- Read paper 20 together: spatiotemporal prediction of PM2.5 concentration by idw-blstm under different time granularity
- Collection of wrong questions in soft test -- morning questions in the first half of 2010
猜你喜欢

一款開源的Markdown轉富文本編輯器的實現原理剖析

Mongodb compass connects to the Alibaba cloud remote server database or reports an error occurred while loading instance info: command hostinfo req

Common terms of electromagnetic compatibility

Small program imitating Taobao Jiugong grid sliding effect

前几年的互联网人vs现在的互联网人

PowerShell:因为在此系统上禁止运行脚本,解决方法

Hugo 博客搭建教程

Hugo blog building tutorial

2022 ICML | Pocket2Mol: Efficient Molecular Sampling Based on 3D Protein Pockets

Call C function in Lua
随机推荐
Interpretation and implementation of proxy mode
Vercel 使用 HTTP 缓存
Latex operation
Filter and listener
SEO specification
Summary of webdriver API for web automated testing
Simple static web page + animation (small case)
Suffix Automaton
PowerShell:因为在此系统上禁止运行脚本,解决方法
如何优雅的处理async/await错误信息
Redis
The data obtained from mongodb query data command is null
Read paper 20 together: spatiotemporal prediction of PM2.5 concentration by idw-blstm under different time granularity
Zoom and move the H5 part of the mobile end
使用Service Worker优选请求资源 - 持续更新
JSTL -- JSP standard tag library
Use the visual studio code terminal to execute the command, and the prompt "because running scripts is prohibited on this system" will give an error
Uni app dynamic add style dynamic bind background image invalid
Google Chrome browser reports an error: net:: err_ BLOCKED_ BY_ CLIENT
Record a troubleshooting process - video call cannot be picked up