当前位置:网站首页>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';
边栏推荐
- Webpack system learning (VIII) how contenthash can prevent browsers from using cache files
- php开发博客系统的首页头部功能实现
- Get parameters on link
- Redis
- Common terms of electromagnetic compatibility
- Mongodb compass connects to the Alibaba cloud remote server database or reports an error occurred while loading instance info: command hostinfo req
- Hugo 博客搭建教程
- Read paper 20 together: spatiotemporal prediction of PM2.5 concentration by idw-blstm under different time granularity
- R: Employee turnover forecast practice
- CTFSHOW SQL注入篇(211-230)
猜你喜欢

Analyse du principe de mise en œuvre d'un éditeur de texte open source markdown - to - rich

Redis数据持久化

Catalan number

【Flutter 问题系列第 67 篇】在 Flutter 中使用 Get 插件在 Dialog 弹窗中不能二次跳转路由问题的解决方案

Redis master-slave replication, sentinel mode, cluster

Ultra quicksort reverse sequence pair

Redis data persistence

Record a troubleshooting process - video call cannot be picked up

【Try to Hack】upload-labs通关(暂时写到12关)

Collection of wrong questions in soft test -- morning questions in the first half of 2011
随机推荐
Collection of wrong questions in soft test -- morning questions in the first half of 2010
web自动化测试之webdriver api总结
El expression
Zoom and move the H5 part of the mobile end
Online audio adjustment technology summary
Uni app Ali font icon does not display
SQL advanced challenge (1 - 5)
Time format method on the official demo of uniapp
用navicat将mysql数据转化为postgresql
Knife4j aggregation 2.0.9 supports automatic refresh of routing documents
Latex operation
SS selector
Applet version update
php开发博客系统的首页头部功能实现
Redis
【Flutter 問題系列第 67 篇】在 Flutter 中使用 Get 插件在 Dialog 彈窗中不能二次跳轉路由問題的解决方案
工业互联网通用通信协议
MVP framework for personal summary
Common ways to traverse map sets
Lenovo notebook computer uses the insert key. When the mouse becomes a small square, how to solve it