MySQL5.7 windows binary installation tutorial, mysql5.7 binary

Source: Internet
Author: User

MySQL5.7 windows binary installation tutorial, mysql5.7 binary

Introduction
1. Download and decompress
: Http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.14-winx64.zip
Decompress and rename the downloaded mysql to C: \ Program Files \ MySQL Server 5.7"

2. Create a directory
Create a Data file and Log file storage directory: D: \ MySQL \ Data; D: \ MySQL \ Log

3. Create my. ini
Create the my. ini file in the C root directory (note the hidden file suffix). The content is as follows (only list the required configurations for installation ):

[client]no-beepsocket =0.0port=3306[mysqld]server-id=45port=3306character-set-server=utf8mb4pid-file ="mysql.pid"socket =0.0basedir="C:\Program Files\MySQL\MySQL Server 5.7"datadir="D:/MySQL/Data"tmpdir="D:/MySQL/Data"default-storage-engine=INNODB#####==========================================================================[log]================================================================================slow-query-log=1long_query_time=1slow_query_log_file="D:/MySQL/Log/mysql-slow.log"##log-bin="D:/MySQL/Log/mysql-bin"log-error="D:/MySQL/Log/mysql-error.log"

4. initialize Installation
Go to the cmd command interface and switch to "cd C: \ Program Files \ MySQL Server 5.7 \ bin"
Copy codeThe Code is as follows: mysqld -- defaults-file = C: \ my. ini -- initialize -- innodb_undo_tablespaces = 3 -- explicit_defaults_for_timestamp

5. Configure Environment Variables
Add to Environment Variable
C: \ Program Files \ MySQL Server 5.7 \ bin

6. Add mysql Service
Add service mysqld install MySQL -- defaults-file = "C: \ my. ini"
Remove service mysqld remove
Note: Here "MySQL" is the service name

7. Start and close mysql
Start net start mysql
Disable net stop mysql

8. log on to mysql
1) if the installation method is-initialize-insecure, a root user password will be generated during the installation process.

2) if you use the -- initialize method for installation, a root user password will be generated in the error log file during mysql-u root-p login (here I will adopt the second installation method)

9. Change the User Password
SET password = PASSWORD ('');
Or
Alter user 'root' @ 'localhost' identified by 'new _ password ';
Reference: http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html

Summary
The entire installation process is still relatively simple !!!

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.