English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Preface: Reinstalling Windows10I was just organizing files, but it took me the whole afternoon to install MySQL, which was really not worth it, so I wrote this article to help everyone.
Reference link: mysql 5.7.11 winx64.zip installation and configuration tutorial with pictures and text
Some steps are done in my case, they are always wrong, I will point them out appropriately, hoping it will be helpful to you.
One, download
https://dev.mysql.com/downloads/mysql/
Two, decompress the zip package
Three, configure the environment variables
(1)Configure Path
(2)Modify mysql-The original default.ini configuration file:
# These are commonly set, remove the # and set as required. # basedir = ...... # datadir = ...... # port = ...... # server_id = ......
Modified:
Four, enter the command prompt cmd as an administrator
Note: Execute mysqld first -install, then execute mysqld –initialize
(1)Execute mysqld -install
C:\Users\donald>cd D:\tools\developer\MySQL\mysql-5.7.17-winx64\bin C:\Users\donald>d: D:\tools\developer\MySQL\mysql-5.7.17-winx64\bin>mysqld -install Service successfully installed. //Service successfully installed
(2)Execute mysqld –initialize
D:\tools\developer\MySQL\mysql-5.7.17-winx64\bin>mysqld --initialize D:\tools\developer\MySQL\mysql-5.7.17-winx64\bin>
The data folder will be automatically created
(3)mysqld.exe -nt –skip-grant-tables (Note: The window does not respond)
D:\tools\developer\MySQL\mysql-5.7.17-winx64\bin>mysqld.exe -nt --skip-grant-tables
(4)Close the window directly, then reopen dos (open in the same administrator mode)
C:\Users\donald>mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.17 MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use mysql Database changed mysql> update user set authtication_string=Password('admin') where user="root"; //At this time, it will prompt that the modification was successful, or warning, etc. mysql>flush privileges; 0 rows affected (0.01 sec)
V. Verification Successful
(1Terminate the mysqld process in Task Manager and start the mysql service
C:\Users\donald>net start mysql
If there is:
Open Task Manager, find mysqld, end the process. Then restart mysql, and it's done.
(2Enter mysql -u root -p
C:\Users\donald>mysql -u root -p //Enter admin
Exciting topic sharing: installation tutorials for different versions of mysql mysql5.7Installation tutorials for all versions mysql5.6Installation tutorials for all versions
That's all for this article, I hope it will be helpful to everyone's learning, and I also hope everyone will support the Yelling Tutorial more.
Statement: The content of this article is from the Internet, and the copyright belongs to the original author. The content is contributed and uploaded by Internet users spontaneously, and this website does not own the copyright, has not been manually edited, and does not assume relevant legal liability. If you find any content suspected of copyright infringement, please send an email to: notice#oldtoolbag.com (Please replace # with @ when sending an email to report abuse, and provide relevant evidence. Once verified, this site will immediately delete the infringing content.)