Windows Installation mysql-5.7 compressed version detailed tutorial, windowsmysql-5.7

Source: Internet
Author: User

Windows Installation mysql-5.7 compressed version detailed tutorial, windowsmysql-5.7
Preface install the mysql database today and go to the mysql official website. For windows, there are two versions of files to download: one is the. msi installation file and the other is the. biz compressed package. I have been using the installation file for installation before, and I have never tried it. Today, I suddenly don't want to use the installation file. It's time to use a compressed package for installation. So I downloaded the compressed package and searched for some installation tutorials. The installed mysql service always reported an error. I tried to find another tutorial and still couldn't start the service ...... So I don't trust Baidu anymore. Go to the mysql official website and find the mysql5.7 document: http://dev.mysql.com/doc/refman/5.7/en/installing.html. the project is successful in one step.
Download mysql

  • Go to the official website: https://www.mysql.com/

  • Click the Downloads tab.
  • Click [MySQL Community Edition (GPL)] at the bottom, and then click [Community (GPL) Downloads »]
  • Click DOWNLOAD under MySQL Community Server (GPL]
  • Download [Windows (x86, 64-bit), ZIP Archive] on the pop-up page]
Installing a mysql package is equivalent to saving installation files. to use it, you must configure it correctly and use the service to start the database service. 1. decompress the compressed package to your desired location this example is decompressed to: D: \ mysql-5.7.13-winx64, folder


2. Create the my. ini file with the following content: [plain] view plain copy
  1. [Mysqld]
  2. Port = 3306
  3. Basedir = "D: \ mysql-5.7.13-winx64 \\"
  4. Datadir = "F :\\ mysqlData \\"
  5. Max_allowed_packet = 32 M
Note that basedir and datadir must be configured. basedir is the directory you extract. According to official documents, if you prefer to use a slash, you need to use a double slash. This is not the case if you use a backslash. That is: D: \ mysql-5.7.13-winx64 \ or: D:/mysql-5.7.13-winx64/because I like to separate the database data files, so the datadir configuration to other places, convenient management. In addition, create the directory.
3. Configure Environment Variables
  • Add a variable named MYSQL_HOME.
  • Modify the Path variable and add % MYSQL_HOME % \ bin at the end.
4. Install the mysql Service
  • Run cmd as an administrator to go To the mysql bin directory.
  • Initialize database files
[Plain] view plain copy
  1. Mysqld -- initialize
After the initialization is successful, some files are generated under the datadir directory. The xxx. err file shows the temporary password of the root account. The line length is like this: [plain] view plain copy
  1. 2016-07-24T05: 19: 255.152.165z 1 [Note] A temporary password is generated for root @ localhost: bl2uwuf0h (X

That is, the password is bL2uuwuf0H (X
  • Register mysql Service
[Html] view plain copy
  1. Mysqld-install MySQL
  • Start mysql Service
[Plain] view plain copy
  1. Net start MySQL

  • Change root Password

[SQL] view plain copy
  1. Mysql-u root-p
[SQL] view plain copy
  1. Alter user 'root' @ 'localhost' identified by 'new _ password ';

View comments

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.