MySQL5.7 binary installation for windows and mysql5.7 binary Installation
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"
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\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
Close
net stop mysql
8. log on to mysql
1. If the installation method is
-initialize-insecure,
A root user password is generated during installation.
2. If you use--
Initialize installation, in
Mysql-u root-pA root user password will be generated in the error log file during 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 !!!
Note: Author: pursuer. chen Blog: http://www.cnblogs.com/chenmh All essays on this site are original. You are welcome to repost them. However, you must indicate the source of the article and clearly give the link at the beginning of the article. Welcome to discussion |